3 ms·
Going from N features to N+1 features creates N! new interactions to consider. For example, if we have a bunch of language features, and we decide to add a new
by chriswarbo 4y ago
Going from N features to N+1 features creates N! new interactions to consider.
For example, if we have a bunch of language features, and we decide to add a new one, e.g. exceptions, we now have to consider:
- How exceptions work
- How exceptions interact with threads; how exceptions interact with dynamic binding; how exceptions interact with dynamic binding in threads; how exceptions interact with mutable variables; how exceptions interact with mutable variables in threads; how exceptions interact with dynamically-bound mutable variables in threads; and so on.
Also, all of the language's tooling needs updating: compilers, linters, documentation generators, static analysers, formatters, syntax highlighters, auto-completers, etc.
- mirekrusin 4y agoThat's why algebraic effects are cool, right?
- chriswarbo 4y agoI'd say any feature is cool if it: - Is small/simple/principled (i.e. understandable) - Enables many desirable programming styles or capabilities - Complements other features: ideally working even better in combination; or at least, working in an obvious way Algebraic effects tick all these boxes IMHO. In particular, there are many languages which feature try/catch AND for/yield AND async/await AND call/return; whereas having algebraic effects subsumes all that, turning it into library code. Note that we can get pretty much the same thing with, say, delimited continuations; so they're also cool. However, having delimited continuations AND algebraic effects would seem redundant/bloated.