Hacker News new | ask | show | jobs
by Gibbon1 859 days ago
I agree with the thought that we need a C compiler that is written something other than C++.

One thing that caught my attentions is this paper.

https://www.cs.purdue.edu/homes/rompf/papers/xhebraj-ecoop22...

"This work is based on the observation that in cases where returning a stack-allocated value is desired, the value’s lifetime is typically still bounded, it just needs to live a little bit longer than the procedure that allocated it. So, what would happen if we just don’t pop the stack and delay it until one of the callers resets the stack, popping multiple frames at once? It turns out that this surprisingly simple idea can be made to work rather well."

Create a C compiler that does this.