3 ms·
I see what you are saying, I still disagree. Maybe I should have added "modern" to my statement. I am a functionnal programming zealot too (although I am mostl
by rubenfiszel 5y ago
I see what you are saying, I still disagree. Maybe I should have added "modern" to my statement.
I am a functionnal programming zealot too (although I am mostly doing rust these days) but I think it is less about procedural vs functional than it is about the abstractions used and the overall "power" (as in, it does a lot of work for you) of the compiler. My argument is that a more generic but extremely powerful compiler (because it had more work and iteration that went into it) will beat any specialized poorly made compiler any days.
Python, Rust, Typescript, Scala, etc, etc... they all support lambdas in one way or another and have reached some kind of local optimal for the tradeoff that they are making. My claim is that you are never better off these days inventing a non-embedded DSL, and if embedded DSL you build, do it as a simple library in one of the nice modern language.
- karmakaze 5y agoAdding time with mutable local variables is along the same axis as having mutable state in objects, only more fine-grained in the call stack. Yes you can write algorithms like this, if you like playing the computer ticker tape game. These modern languages with lambdas are what enable writing in a functional style. One can choose to use single-assignment 'var's and map/filter etc, at that point you're not using the procedural aspect of the language which is great, but why not start with a language that more than allows it.