Yesterday I told a friend of mine (who is a self-taught frontend developer and user of Typescript) that sooner or later something similar will happen with the side-effects. I'm not saying that languages like Elm or Purescript will become mainstream, but I think that static side-effect checkers will gradually become widely used. Maybe starting with adding the "pure" annotation to the Typescript functions [1] (Solidity already has this feature), although I believe something more complex is needed.
What do you think? How would you implement this behaviour in a language targeted at JavaScript developers (transpiled to JavaScript)? I use Purescript myself but I don't think purely functional languages will ever be mainstream. Instead, traditional languages will be getting more and more functional-like features.
[1] Suggestion: document and enforce side effects of functions https://github.com/Microsoft/TypeScript/issues/19520