4 ms·
This is like saying non-nullable references are a problem because nullable refs are sometime useful. Nothing prevents you from having state in an haskell appli
by sbergot 7y ago
This is like saying non-nullable references are a problem because nullable refs are sometime useful.
Nothing prevents you from having state in an haskell application. You just have to be explicit about it.
Whether the language ergonomics are better or worse than a language that allows state without an explicit type is another question but your reasoning is questionable.
- cryptica 7y agoYou can also have pure functions in OOP languages. You can even have a code linter to enforce it as a rule. When discussing programming languages, it's more about what behaviours they encourage rather than what behaviours they support.
- rowanG077 7y agoOOP language aren't explicit in what function is pure. If I'm working on a 10MLoC project and touching hundreds of methods while working I can't lookup the implementation of each one to determine whether they are pure. And no a comment saying they are pure is not sufficient. The above is trivial in FP languages.
- mrkeen 7y agoHow do I do this?