[Issue 17440] Nullable.nullify() resets referenced object

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 13 10:37:30 UTC 2018


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

Chris Paulson-Ellis <chris at edesix.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |chris at edesix.com
         Resolution|INVALID                     |---

--- Comment #8 from Chris Paulson-Ellis <chris at edesix.com> ---
Reopening for reconsideration, because:

When using Nullable as an analogue of Java Optional or Haskell Maybe, there is
no reason why you shouldn't use a reference type.

Destroying on nullify will invalidate *other* references to the object, which
goes beyond the remit of Nullable.

And finally, because I was asked to submit a bug report and this one already
existed. See forum discussion:

https://forum.dlang.org/thread/rglbcxolihbogsvvnser@forum.dlang.org

--


More information about the Digitalmars-d-bugs mailing list