4 ms·
I think the main thing is not really FP vs whatever else but the most fundamental thing is declarative vs imperative. That is probably the biggest jump in minds
by margorczynski 4y ago
I think the main thing is not really FP vs whatever else but the most fundamental thing is declarative vs imperative. That is probably the biggest jump in mindset when coming from e.g. C or C++ to something like Haskell - that instead of telling the computer/compiler what to do, you describe what you want.
- crop_rotation 4y agoYou are still telling the computer what to do, describing what you want is more like prolog. The main difference between Haskell and C in a case like this would be the level at which you tell it what to do.
- margorczynski 4y agoThat's a truism that when extend equates Firefox or Excel with programming with C because at the end of the day you tell the computer what to do via some interface (text programming language or graphical with much more abstraction layers).
- janetacarr 4y agoI think this would be correct for declarative programming languages, but I don't agree that Haskell is a declarative programming language. Haskell is pure functional programming in my mind. A declarative programming language might be something more akin to DML SQL for a RDBMS, or HCL for Terraform (pre-looping, v0.X).
- margorczynski 4y agoPure FP languages are declarative just with additional restrictions like referential transparity, no explicit handling of state and immutability of the underlying state. For these restrictions to be effectively held it requires for it to be declarative.
- janetacarr 4y agoOh I see what you mean. I had to look into this a bit. Sorry for the confusion!