Ranter
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
Comments
-
Little to no practical use in real world for pure functional languages. Developed by mathematicians for mathematicians.
-
10Dev28534yCall me crazy, but OOP done right is beautiful. The idea of self-encapsulated little bits of code that contain everything they need working in harmony to form a large and complex system is art.
The idea that real-world objects can be represented in a simple and abstract way, and that software is the interactions between these objects is intuitive and straightforward.
OOP with a few functional concepts (immutable state and pure functions, for example) is an intuitive and simple way to build complex systems of software
Where OOP goes wrong is with polymorphism and inheritance and all that nonsense. OOP doesn't need that, it never has and it never will. Shitty codebases with 2000 line classes is why OOP has a bad name, but the ideas behind it aren't at fault
Mark my words, as soon as FP goes mainstream, if ever, you'll have shitty codebases in that paradigm too. It's not the ideas that determine the quality of the codebase, its the developers writing the software -
Write no code.
Deploy nowhere.
Functional paradigm can be used in specific context for great effect - like massive parallel computing projects. but general day to day stuff like web backend, it is not flexible enough.
Try and imagine writing a Web frontend using functional.JS
.....
🤬 -
I recently read "Functional Programming simplified" which talks about wrting as functional as possible in scala.
About 2/3rds of the book were cool and seemed practical for day-to-day coding. The last part became very convoluted and seemed like it was only useful ifnyou force fully want to write pure functional. Even the simple examples became longer and more complicated than imperative counterparts.
I think no progsmming paradigm is perfect (except for very specific use cases). You should just take the best parts from each. A OOP/FP moxed language where I can choose which paradigm fits for my current use case and architecture best? Count me in. -
Yes, FP is future but it is not for everybody for every use case. For example Purescript is the best FP language I know of and I would recommend it over typescript but full Javascript with heavy FP libraries are no go for me.
As always take what works and ignore the rest. You don't need to use complicated monads to do what you need to do. Use boring FP parts and make what you need to make.
Composition FTW. -
The funny thing with the hype over functional languages at the moment is that it's near enough *exactly* the same as the hype over OOP languages in the late 90s and early 2000s. Everyone starts talking crap about the current de facto standard, gives a few nice advantages of the paradigm they think is better, and if you dare criticise it then you must be a first class retard, there's no other explanation.
Functional languages, even pure ones, are *great* in certain scenarios. Have a stateless, naturally idempotent service? Sure, it's probably a fantastic fit. Same for OOP. Have a naturally mutating problem domain, like representing a 3D world with actual objects?! Classic fit.
In reality it's often between these scenarios of course, which is why modern languages like Kotlin let you pick and choose whatever style works best. If you think either style, or any other one, can *never* be a good fit, you're quite simply wrong. It's that simple. -
Baksman12394y@magicMirror its fun, declarative frameworks like react and flutter are fun, which are birthed from fp concepts
Any functional-first developers here? Any hate functional paradigms? Why?
question