Hacker News new | ask | show | jobs
by zepatrik 1961 days ago
It would actually make sense to have linter rules in javascript to report impure functions and avoid them as much as possible. But as the article said, JS is kinda broken already as you can have proxies and stuff that possibly adds side effects to the most basic expressions.
1 comments

The article author wrote this ESLint plugin to do just that https://github.com/jfmengels/eslint-plugin-fp

then he (I) happily switched to Elm, because even with a lot of static analysis rules, it's really hard to avoid impure functions when a lot of the libraries and existing code use that, and sometimes even require that.