Details
Joined devRant on 4/28/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
@Fast-Nop what about Yi?
You never explained what those layers are FP needs but OOP doesn't.
And which OOP gui application is written without any framework?
And what does the browser do for you, that makes those applications not count?
1) so that's why FP programs tend to be much shorter, because they require more bloat.
"It's not about what you code..." what?
3) never heard anyone say something about security. Sure, less bugs, better maintainability, but security has nothing to do with that.
4) what is a GUI operation? Do you mean rendering? -
@Fast-Nop Why would FP need a browser? Web development needs a browser, it doesn't matter what paradigm you use. And you use frameworks for the same reason in OOP as you use them in FP.
1) I argue that FP has less bloat
2) There are text editors written in functional languages and they're not slower
3) Who says OOP is less secure? Why would it need more bload? Why would that bloat be in OOP?
4) what? What heavy lifting? -
@Fast-Nop why does GUI programming in a browser not count? That makes absolutely no sense. Why is native GUI programming more important than web GUI?
What about React native? -
Wouldn't 100000 ++ of downvotes be 100000 -- ?
-
@Fast-Nop what is an OOP browser? Where does Redux put in OOP?
Of course that would suck. And many people use OOP for this. But you can do it in FP too and be fine. There is nothing intrinsic OOP about GUI. -
@Fast-Nop if you go down to window handling you have procedural code, as the interface to your OS is usually written in C. From there you can take any paradigm you want. And functional GUI handling does not "put in tons of OOP", what do you even mean with that?
-
@Fast-Nop for gui you can do quite well with FP (Elm, React+Redux, ...). For games you usually don't do FP, that's true. But you also often don't do OOP.
-
@AndSoWeCode but that is exactly what I said. The interface in OOP is not simpler than in FP. I need to pass the exact same amount of parameters.
foo.insertAt(2, "bar")
insertAt foo 2 "bar"
Requires the same parameters and same amount of changes when you alter the interface -
@AndSoWeCode you have literally the same problems in OOP. In foo.bar() the new data does not magically appear, you have to somehow get it into the class. And if you don't pass them in OOP they have to be fields. I hope you are none of those that force parameters into fields, just to not pass them as a parameter, because that is a hell to maintain.
"fuck, I need a function with the same data" if that data is 4 random parameters then you fucked up. FP does have structural data types. Interface design does not become harder in FP. The reason I like FP is because of better maintainability and simpler code.
Yeah, use the right paradigm for the Job. And imo imperative/procedural code (not OOP) is best for when you need the absolute control and performance.
If you have a bigger application and need fast to write, easy to maintain code, then a declarative approach (like FP) is best suited.
I really don't see a reason in production code for OOP, but it is the best paradigm for learning. -
@ganjaman mainly back end, but if I can use React + Redux then front end is fine
-
@ganjaman it is. Keep it simple, stupid
-
@AndSoWeCode I really don't understand what you mean with headers. In FP and OOP you expose some Api to other Modules and Classes and the internals are not exposed.
And for memory sharing: it's not what FP wants to avoid, FP makes YOU not have to deal with memory. The compiled binary uses as much mutable state as it pleases but YOU don't have to think about mutable state. -
@xewl but she wants to talk to her friends, !friends do not matter for this rant
-
How can there be dev, !dev and others?
-
@AndSoWeCode functional languages share memory a lot. I mean there can be cases where mutable data is notably faster, but these make up a very low percentage.
With FP you can change the inner workings of a function, I don't see how OOP helps here -
@AndSoWeCode it actually decreases maintainance costs as the code is easier to reason about because it is generally shorter and free of side effects. You don't lose performance too much, the compiler is able to do a ton of optimization. Memory copying is not an issue.
If you need the full controll and have something like a microprocessor, then an procedural language is better suited. But for large applications you don't gain any performance from non-functional code. There might be certain hotspots you want to manualy optimize, but you wouldn't do that with OOP -
@HampusMa in the conext is wasn't clear to me, if you were serious. Also I don't think that someone who likes C will like C#.
-
How often does something need to be reposted to count as spam?
-
@HampusMa C and C# are not similar. The only thing in common are the C like braces. Also I thought you might be a troll for recommending C#
-
@HampusMa not sure if troll or not
-
tmux is love, tmux is life
-
@dangerzone we need a sarcasm font
-
@AndSoWeCode I have the same experience. I feel like the SO community barely downvotes something that should not be downvoted. From what I see they only miss providing feedback for why they downvote a question sometimes.
-
The colors make perfect sense as they go from warm to cold
-
Oh, only the 10th time someone posted this this week
-
for everything except Java -> Emacs
for Java/Kotlin -> Intellij community -
Where is @irene with the joke/meme comment?
-
@netikras functional programming
-
@netikras I actually dislike those kind of patterns. Well, I am just one of those grumpy fp guys :D
-
@netikras yep