4 ms·
If you intentionally code JS with referential transparency in mind, then this type of refactoring is just as esay, if not easier.
by rmrfrmrf 9y ago
If you intentionally code JS with referential transparency in mind, then this type of refactoring is just as esay, if not easier.
- vog 9y agoWould you mind to elaborate? How does "having referential transparency in mind" protect against typical refactoring errors, such as an unexpected "undefined" value due to a typo in a field name? (Of course you could argue that you don't need OCaml for that, as TypeScript or Flow can prevent this, too. But then the argument of using "dynamic" JavaScript instead of static types is moot.)