Immutability is kind of a fashion trend (see here), but for beginners it may be challenging to understand the concepts. How can a program do anythi...
For further actions, you may consider blocking this person and/or reporting abuse
Extreme functional programming has some significant drawbacks compared to its advantages, but the concept of not modifying the input seems quite useful.
If the guarantee that every function does not modify the input is maintained, in most cases, logic can be handled with shallow copies.
Most people think, FP and OOP exclude each other, but this is not true. There is no limitation to build parts of your code following the principles of FP and call this functions from within class methods.
Even inside a class it can be most beneficial to limit the number of side effects and use mainly pure functions. This is already good programming style. But using ONLY functions may make things more complilcated then necessary.
I guess a good and healthy combination of both styles should be preferred. OOP really benefits FP and vice versa.
Well said.
Thank you Eckehard ,
Look at this :
Trampoline
TCO
JavaScriptCore (Safari, Bun) is the only engine that implements TCO
Chrome (V8) has marked TCO as No longer Pursuing.
Tail call optimization in ECMAScript 6