On 10/9/13 10:07 AM, monarch_dodra wrote:
On Wednesday, 9 October 2013 at 16:34:52 UTC, BLM768 wrote:
On Wednesday, 9 October 2013 at 06:48:31 UTC, monarch_dodra wrote:
OK, so that's two functions already. What about opCmp? What about
toHash?
Since ordered comparisons make no sense with
On Thursday, 10 October 2013 at 10:09:23 UTC, Andrei Alexandrescu
wrote:
I'm confused. I thought Nullable!T == T is well defined to mean
true if a value is present and equal to the right-hand side,
or false otherwise (the absence of a value is a singularity
unequal with all objects). What's
On 2013-10-10, 13:28, monarch_dodra wrote:
On Thursday, 10 October 2013 at 10:09:23 UTC, Andrei Alexandrescu
wrote:
I'm confused. I thought Nullable!T == T is well defined to mean true
if a value is present and equal to the right-hand side, or false
otherwise (the absence of a value is a
On Tuesday, 8 October 2013 at 19:04:33 UTC, BLM768 wrote:
I've been working on a project that makes relatively heavy use
of nullable values. I've been using std.typecons.Nullable, and
it mostly works well, but there are some improvements that
could be made to the implementation:
* A
On Wednesday, 9 October 2013 at 06:48:31 UTC, monarch_dodra wrote:
On Tuesday, 8 October 2013 at 19:04:33 UTC, BLM768 wrote:
I've been working on a project that makes relatively heavy use
of nullable values. I've been using std.typecons.Nullable, and
it mostly works well, but there are some
On Wednesday, 9 October 2013 at 06:48:31 UTC, monarch_dodra wrote:
OK, so that's two functions already. What about opCmp? What
about toHash?
Since ordered comparisons make no sense with null values, opCmp
would need to throw an exception when working with null values
anyway. That's exactly
On Wednesday, 9 October 2013 at 16:34:52 UTC, BLM768 wrote:
On Wednesday, 9 October 2013 at 06:48:31 UTC, monarch_dodra
wrote:
OK, so that's two functions already. What about opCmp? What
about toHash?
Since ordered comparisons make no sense with null values, opCmp
would need to throw an
On Wednesday, 9 October 2013 at 17:07:18 UTC, monarch_dodra wrote:
That was my point. Writting Nullable!T == T is the exact same
thing: Comparison of a value with the absence of a value. It's
neither equal nor different, it's an error.
Equality comparison is a bit different from properties
I've been working on a project that makes relatively heavy use of
nullable values. I've been using std.typecons.Nullable, and it
mostly works well, but there are some improvements that could be
made to the implementation:
* A toString() method (needed to fix bug #10915)
* An opEquals for
On Tuesday, 8 October 2013 at 19:04:33 UTC, BLM768 wrote:
I've been working on a project that makes relatively heavy use
of nullable values. I've been using std.typecons.Nullable, and
it mostly works well, but there are some improvements that
could be made to the implementation:
* A
On Tuesday, 8 October 2013 at 19:20:05 UTC, Brad Anderson wrote:
The wiki has a pretty good guide of the overall process:
http://wiki.dlang.org/Pull_Requests
That answers most of my questions, but it seems a little...
informal. I guess the formal review process doesn't really apply
to
On Tuesday, 8 October 2013 at 19:04:33 UTC, BLM768 wrote:
I've been working on a project that makes relatively heavy use
of nullable values. I've been using std.typecons.Nullable, and
it mostly works well, but there are some improvements that
could be made to the implementation:
* A
On Tuesday, 8 October 2013 at 20:55:35 UTC, monarch_dodra wrote:
Or we could just nuke the alias this. A Nullable!T isn't a T.
It's a T handler. alias this allows implicit cast, which
should only happen with a is a relation. Using it in a
different context (such as nullable) is wrong, and
On Tue, 08 Oct 2013 22:55:34 +0200
monarch_dodra monarchdo...@gmail.com wrote:
A Nullable!T isn't a T. It's a T handler.
I see that as an (unavoidable) implementation detail.
alias this allows implicit cast, which should
only happen with a is a relation. Using it in a different
context
On Tuesday, 8 October 2013 at 19:04:33 UTC, BLM768 wrote:
* Making isNull() @property
Hmm... looks like it's already @property. I guess this happened
after the last update to the Phobos docs.
I'll still need to fix the other stuff, though.
On Wednesday, 9 October 2013 at 03:42:50 UTC, Nick Sabalausky
wrote:
Personally, I find Nullable's alias this functionality to be a
wonderful convenience. FWIW.
Yeah, it's convenient to be able to switch out T with Nullable(T)
and have it work without breaking the API... Well, it sort of
16 matches
Mail list logo