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

2018-01-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #17 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/5b04f455711a517cec273dad5eb4e4fda193ebff Fix issue 17440: do not call .destroy on class

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

2018-01-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED

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

2018-01-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #16 from hst...@quickfur.ath.cx --- Rebooted: https://github.com/dlang/phobos/pull/6043 Due to design issues with the current implementation of Nullable, it's not possible to fix the problem of having two distinct null states without

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

2018-01-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 Steven Schveighoffer changed: What|Removed |Added CC|

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

2018-01-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #15 from

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

2018-01-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #14 from Chris Paulson-Ellis --- Also - to emphasise what was said in comment 11 - let me just say that it took me *3 days* to find that the cause of a mysterious crash in my code was the destroy in nullify(). At the

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

2018-01-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #13 from Chris Paulson-Ellis --- Perhaps it would be helpful to reiterate one of my comments from my original forum thread linked in comment 8... For those confused as to why you'd want to wrap a Nullable around

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

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #12 from hst...@quickfur.ath.cx --- I think you misunderstood my comment. I meant that one way to fix this bug is to change Nullable, or at least the overload that takes a single type parameter, so that it does not instantiate for

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

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #11 from Marenz --- I can only repeat what I said before. The principle of the least surprise should apply. No one expects their object to be destroyed when a reference to it is set to null, be it through

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

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #10 from hst...@quickfur.ath.cx --- P.S. Actually, Nullable does have another overload that takes a null value to be used in lieu of a boolean flag. So conceivably, you could use Nullable!(T, null) instead of Nullable!T and you will have

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

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

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

2018-01-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 Chris Paulson-Ellis changed: What|Removed |Added Status|RESOLVED|REOPENED

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

2017-07-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #7 from Vladimir Panteleev --- Yep, deprecating Nullable for reference types seems like a reasonable idea; feel free to reopen or refile as a new enhancement. --

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

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #6 from RazvanN --- (In reply to Marenz from comment #5) > Closing? Well.. It is _very_ unexpected that Nullable would just follow a > reference and kills everything. It's like you add a pointer to an array and

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

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #5 from Marenz --- Closing? Well.. It is _very_ unexpected that Nullable would just follow a reference and kills everything. It's like you add a pointer to an array and after setting it to null your pointed

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

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED

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

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #4 from RazvanN --- Eveyone ok with closing this? --

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

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #3 from Marenz --- >Is there any particular reason you need to use Nullify with a class type >instead of simply using the class type directly and use "null" to indicate the >unset state? There is no

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

2017-07-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #2 from Vladimir Panteleev --- (In reply to Marenz from comment #0) > I am not sure if it is desired, but it was highly unintuitive and unexpected > for me: > > If you use Nullable with a class type

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

2017-07-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 RazvanN changed: What|Removed |Added CC|