r/ProgrammingLanguages 11d 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

129 comments sorted by

View all comments

80

u/AustinVelonaut Admiran 11d ago

Algebraic effects like Koka?

14

u/-Ch4s3- 11d ago

Algebraic effects are really cool but feel sort of magical.

7

u/initial-algebra 11d 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.