http://d.puremagic.com/issues/show_bug.cgi?id=8040



--- Comment #3 from Kenji Hara <k.hara...@gmail.com> 2012-05-23 03:26:04 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> But isn't it better to add types (as in cast(Foo) or cast(Bar*)) to better 
> tell
> apart the three kinds of null in that example?

No, it isn't. It is consistent with other literal formatting.

writeln(1);  // prints "1", not "cast(int)1"
writeln(1L); // prints "1", not "cast(long)1"
writeln(1f); // prints "1", not "cast(float)1"

And, formatting as like cast syntax will make unfomatting complicate. It is
less benefit.

Furthermore, std.format module does not print value type in general.
(Deprecated typedef value was formatted like cast syntax, but I think it is
special case)

Therefore, I think your proposal has many faults than benefits.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to