[Issue 19092] __delete doesn't work with immutable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 18 10:41:04 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19092

Mike Franklin <slavo5150 at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slavo5150 at yahoo.com

--- Comment #1 from Mike Franklin <slavo5150 at yahoo.com> ---
In principle, yes, `__delete` should be a drop-in replacement for `delete`, but
using `__delete` should be avoided unless all other options have failed.  In
fact, when `delete` was deprecated there was some resistance to creating
`__delete`.  In my opinion, all it does is encourage anti-patterns and
technical debt, and I wish `__delete` was never created.

What is the actual use case and why is `destroy` in combination with `free`ing
functions not possible?

--


More information about the Digitalmars-d-bugs mailing list