[Issue 21415] catch immutable exceptions breaks immutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 23 17:48:20 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21415
--- Comment #3 from Adam D. Ruppe <destructionator at gmail.com> ---
Yeah, the immutability being lost destroyed what I was hoping to do with this,
so definitely the bigger problem. But it being lost either direction is
problematic.
Really a "catch-all" would be `catch(const Throwable)`. Const and immutable
objects should NOT be caught by a catch mutable. I realize nobody thinks about
this but we probably should start.
An immutable exception can be used without allocation concerns.
--
More information about the Digitalmars-d-bugs
mailing list