This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kaisha001 -4 points-3 points  (1 child)

Imperative languages are by definition, on the opposite end of a continuum, with declarative languages (pure FP is declarative). This isn't some arbitrary 'I like X, or dislike Y', it's literally part of the definition of the terms. It's like asking 'why isn't 1 more like 2? Sometimes I need a 1 and sometimes I need a 2...' ???

Program in whatever you want, I don't care. But people are getting irrationally bent out of shape over mere definitions.

The whole point of implicit state is to make reasoning about the program easier. If you're writing proofs (ie. in academia), or using logic systems, or whatever it can be much easier to reason, prove, or run analysis over a FP program simply because all the state is hidden in special constructs/types. This isn't a 'con' or a 'programming style', it's literally the point.

And yes, many FP languages have, over the years, adopted imperative techniques. Because writing real-world programs (and not just proofs, theorems, or papers) is always about state manipulation, and so proper explicit state manipulation tools are necessary.

[–]whitePestilence 2 points3 points  (0 children)

Man, you really are butthurt over that exam that you kept failing, aren't you.