3 ms·
Only, it’s not statically analyzable. Rice’s theorem still holds afaik
by znkr 3y ago
Only, it’s not statically analyzable. Rice’s theorem still holds afaik
- addaon 3y agoIt's not statically analyzable for arbitrary programs. Don't write arbitrary programs -- design for analysis, just like you design for test.
- znkr 3y agoWhile that’s possible, it would put severe limitations on what you can do. For example, it would be very difficult to parse nested input data and I don’t see how dynamic function Dispatch would be possible at all. I am not convinced that the benefits would outweigh the costs.
- addaon 3y agoThis is standard practice for embedded and high-reliability systems.
- throwaway894345 3y ago1. This isn’t standard practice for high reliability systems. Lots of highly reliable systems don’t prohibit dynamic dispatch, dynamic memory, etc. 2. Most programs (especially Go programs) aren’t embedded, so this isn’t much of a criticism. 3. If you can statically analyze a C program and make sure it doesn’t overflow the stack, why can’t you statically analyze a Go program and make sure it doesn’t grow the stack beyond a certain size? I’m not arguing that Go is a good fit for embedded, but I don’t see why throwable stacks are a major problem.