r/ProgrammingLanguages • • Jul 23 '26

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

61 Upvotes

127 comments sorted by

View all comments

Show parent comment

1

u/renozyx Jul 26 '26

IMHO panics aren't resumable, what you're talking are exceptions.

I'm not used to 'file not found', 'timeout' results returned as exception instead but it may be mandatory if you want to use linear types indeed

1

u/faiface Jul 27 '26

Afaik, panics are often catchable and resumable in languages that don’t have exceptions otherwise, such as Go and Rust, and use errors as values normally. That’s what I had in mind.

For normal error handling, like “file not found”, “timeout”, and so on, _errors as values_ works just as well in session types as anywhere else. Absolutely nothing changes there, except now those errors are transmitted over channels, and the Ok variant may include a continuation of the session.