4 ms·
You're just using the tacked on features as syntactic sugar. You haven't "bought in" at all. I was traditionally trained like you under OOP and procedural meth
by Herval_freire 4y ago
You're just using the tacked on features as syntactic sugar. You haven't "bought in" at all.
I was traditionally trained like you under OOP and procedural methodologies.
After encounter FP I fully bought in and developed two mental models. The fp model lives side by side with the the oop/imperative model.
With equal knowledge in both one can make a more unbiased judgement. The fp model is actually superior imo.
I largely have the opposite strategy now when programming. My mental model is largely fp, and I occasionally cheat and sprinkle in procedural or oop syntax here and there as syntactic sugar.
The basic realization here should be that mutating shared state should be avoided and segregated as much as possible.
- ok_dad 4y ago> syntactic sugar To be fair, all languages are syntactic sugar over asm which is s-s over CPU machine code. A mental model is just that: a model for something physical that's in your head. FP or OOP are both mental models for programming in nearly any language. Some languages have first-class FP or OOP features, and some don't, but you can tack-on either of these, and others, to nearly any language you want to. It's really dumb to look down on others choice of mental model if it works for them. I have seen successful projects that were designed around both OOP and FP models.
- Herval_freire 4y ago[flagged]
- GrumpySloth 4y agoGarbage collectors, type systems, modules, polymorphic functions are not syntactic sugar. Asm also isn’t syntactic sugar, if only for the polymorphism (how many different CPU instructions are MOV in Asm again?); or just the fact that it’s text and machine code is binary code, while desugaring code doesn’t change its language.