3 ms·
His distinction with hidden memory allocations vs perfect software fails even in his C boolean example. Calling a C function takes up stack space. That's a hi
by white-flame 8y ago
His distinction with hidden memory allocations vs perfect software fails even in his C boolean example.
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.
- janvidar 8y agoRight, 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.
- white-flame 8y agoYes, 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.
- Yoric 8y agoHow would that work with: 1/ recursion; 2/ calling C code; 3/ being called from C?