DEV Community

Discussion on: Imaginary Language Features

Collapse
 
curtisfenner profile image
Curtis Fenner

There's a couple features that have been described in academia but not caught on in any mainstream languages that I think will be important in the company decades.

The main one is functional effects/algebraic effect handlers. They let you capture, inspect, and undo any kind of IO or state mutation that a piece of code does. This makes auditing the security of code easier, it makes testing easier and faster (you can control all non determinism, even being able to check things like "no possible ordering breaks this invariant"; you can also control all scheduling and waiting so no need to have long running tests just for the sake of IO). It also can make the overall reasoning about code more explicit, making it easier to understand and later refactor/replace.

Collapse
 
awwsmm profile image
Andrew (he/him)

Could you give an example of this in pseudocode? I'm not sure I understand.

Collapse
 
curtisfenner profile image
Curtis Fenner

I found a good introductory article coincidentally published yesterday!
overreacted.io/algebraic-effects-f...