2 ms·
I wouldn't say it causes UB. It causes the problem to halt, deterministically, and safely - but maybe annoyingly. Yes, it's not as good as a static guarantee.
by azakai 4y ago
I wouldn't say it causes UB. It causes the problem to halt, deterministically, and safely - but maybe annoyingly.
Yes, it's not as good as a static guarantee. But there are tradeoffs where it makes sense. Again, RefCell in Rust does the same - it's a useful technique.