3 ms·
You 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 abo
by cryptica 7y ago
You 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?