Void is surprisingly useful.
Void is surprisingly useful.
Posted Sep 9, 2026 14:55 UTC (Wed) by alx.manpages (subscriber, #145117)In reply to: Void is surprisingly useful. by iabervon
Parent article: Stabilizing Rust's never type
> Subsequent language design research showed that optional type parameters are a bad idea,
I'm not sure I understand this. Would you mind rephrasing? Or maybe (or also) showing examples?
> and you can make your parameterized types uniform by including some types that the compiler optimizes (like having "function that returns a value you must discard" instead), but that's not how C was designed, so void ends up with all the weirdness that you get if you try to have a value that embodies the effects of not using something optional.
