|
|
|
|
|
by GuB-42
1544 days ago
|
|
Is there a reason for using pure functional programming except as an exercise? Functional programming is great, and most languages nowadays give you the necessary tools like lambdas, closures, list processing, first class functions, etc... but it isn't the right tool for every job. The same languages also typically support object oriented programming with classes, methods, inheritance, encapsulation, etc... Declarative programming is usually not supported by the "main" language but there is often some way to use a secondary language for that, like SQL. Multiparadigm languages are here for a reason, and trying to use a paradigm that doesn't fit only makes your life harder. It is not a bad thing if you are learning or doing research on the subject, but it is a bad thing if you are trying to be productive. |
|
and no, you don't need to go all in. you can make a judgement call and pick and choose what you want to leverage.
for anything but a trivial service immutability of data as you are processing requests should at a minimum be considered.