r/ProgrammingLanguages • u/jimbobmcgoo • 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
View all comments
Show parent comment
1
u/FuncSug_dev Jul 25 '26
I think "Functional core, imperative shell" is the right idea. I'm explaining:
I think programs could be categorized into two kinds: those that mainly aim to produce results and those that mainly aim to produce interactions. In the first kind, I would put scientific, health and business programs. In the second one, I would put games and industrial and embedded-in-things programs.
The best way of express results production is (in my view) mathematical functions and so functional programming. The best way of express interactions is not found yet (in my view).
For business programs, producing interactions is secondary so a thin layer of "imperative shell" is enough. But not for games.
My language does only the "imperative shell", the "functional core" is to be delegated to the host language (in fact, for now, it's JavaScript which is very little functional). In my view, a good "imperative shell" for games has to contain at least these constructs: sequential (two things that have to happen one after the other), parallel (two things that have to happen at the same time) which has to be divided (at least) into two kinds: parallel_and (two things that have to happen at the same time and to end at different times) and parallel_or (two things that have to happen at the same time and not to go past the end of the other). I would add "parallel_select" (very practical for interactive stories) and not restricting reaction to events to an association between an event and an action (that's already easily doable with async/await).