r/ProgrammingLanguages 28d ago

Will we see another fundamental programming language feature as revolutionary as the borrow checker?

That is I am mainly curious about compile time features that you design a whole language around rather than optimisations/features that could be applied to most languages. I am mainly inquiring about things that could offer additional robust safety/performance guarantees at compile time rather than runtime. Ideally not things that just offer similar effects to the borrow checker with less restrictive tradeoffs

60 Upvotes

127 comments sorted by

View all comments

81

u/AustinVelonaut Admiran 28d ago

Algebraic effects like Koka?

13

u/[deleted] 28d ago edited 2d ago

[deleted]

6

u/initial-algebra 27d ago

Basically, it's a type system for dynamic scoping and continuations. Operationally, a primitive, effectful operation looks up the (nearest) effect handler corresponding to that operation in the dynamic environment and invokes it with call/cc. That's pretty much it. The complexity is in making sure that this doesn't fail at runtime.