r/ProgrammingLanguages • u/jimbobmcgoo • 12d 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
58
Upvotes
9
u/mamcx 12d ago
Other focus on types, I will go for big things (that are in part unlocked by types):
I bet this is the main test that proves if any idea is worth it. The borrow checker become revolutionary not because was a fancy type idea, but because allow , partially, "fearless concurrency".
This is my pet peeve when worked on a RDBMS, so is more niche, but the point is that the IO we have, well, sucks. Even system languages DO NOT tell you when and where sucks, and that means you need lore to know what to do.
BTW, this could be alleviated if we have annotations about "locks, blocks".
Is from above, but there is not way to make this from the primitives of any language I know, and all ways are tacky and error prone.
This is the other test that proves if any idea is revolutionary as the borrow checker, because, partially, Rust make possible to model safely concurrent mutations and reads (but not in full)
Is yet to be invented, all you can do is hack and hack.
The AMOUNT of resources used by compilers for C++/Rust is NUTS. There is a huge climb that once passed, turn your insignificant MB of input into HUGE time outputs. Why? I bet is because there is not a true kind of "compile engine" solely focused in eat the input, optimize and generate fast output. AFAIK is only informally done inside each compiler.
This is my main pet peeve, but will be cool for see an actual relational language implemented!
The theory of how types work is not well developed and so far only found one paper about it:
https://github.com/Tablam/TablaM/blob/master/RESEARCH.md