Re:Zig: programming language designed for robustness optimal...
by janvidar on Wednesday May 30, 2018 @05:17PM
(#17191900)
Right, he answers a question about this. His plan seems to be to pre-calculate the stack space required at compile time using static callgraph analysis.
This is not yet implemented.
Re:Zig: programming language designed for robustness optimal...
by white-flame on Wednesday May 30, 2018 @05:40PM
(#17192103)
Yes, but I'm talking about his assertion about that C example earlier in the talk, not about Zig. It's pretty fundamental to his arguments.
Calling a C function takes up stack space. That's a hidden memory allocation which can exhaust just like heap does. But it's even worse because stack allocation failures don't have a place that return a nice clean NULL like malloc does. It's pretty strong to still call this case "perfect software" under his definitions.