4 ms·
> My only hope is for ECMAScript (or maybe TypeScript) to introduce these OK/Err/Maybe/Task concepts as a language feature When using these concepts the need f
by substation13 4y ago
> My only hope is for ECMAScript (or maybe TypeScript) to introduce these OK/Err/Maybe/Task concepts as a language feature
When using these concepts the need for do-notation comes up pretty quickly. It would be like using JS promises without the async keyword!
Of course, follow this to it's conclusion and you will have a functional language.
- Cthulhu_ 4y agoI mean they could ADD it, just like nowadays individuals can choose to implement it themselves, but it wouldn't supersede any existing error / result implementations (success/error callbacks, throw/catch, promises which use both, etc). To improve or change a language, I think you should get rid of another feature if it solves the same problem, instead of add another option.
- substation13 4y ago> just like nowadays individuals can choose to implement it themselves I don't think this is possible with JS right now?