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/Inconstant_Moo 🧿 Pipefish Jul 26 '26

I'll need to look into that. Anything that says it's "well-suited to the object-oriented methodology" can't be quite the same as what I'm doing, which really isn't. And yet the separation is the same, and there are the same benefits they refer to of being able to put whatever validation logic you like on a type (and a whole lot of other benefits too).

Apparently the Eiffel people saw this as a way of making imperative languages sane, whereas I thought I was making functional languages accessible.

In a functional language we wouldn't do what you describe with the stack --- we'd have a function which returns the value and the stack with its head popped off. If we wanted to update the value of a stack contained in a global variable, that would be a command, as updating global state always is.

var

mystack = []

cmd

doPop :
    poppedValue, myStack = pop myStack
    post "popped " + string(poppedValue)

def

pop(s list) :
    s[0], s[1::len s]

Re concurrency, it's actually my hope to keep the users' fingers out of it. The language is based around a request-response model, so the plan is that the runtime should take care of making that concurrent with the user just setting the configuration.