[Issue 8040] writeln(null) too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 23 04:05:56 PDT 2012


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



--- Comment #4 from bearophile_hugs at eml.cc 2012-05-23 04:07:37 PDT ---
(In reply to comment #3)

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

In my opinion writeln(1f) and writeln(1.0L) should print 1.0, as in Python:

>>> int(1)
1
>>> float(1)
1.0


> 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.

OK. Thank you for the answers.

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


More information about the Digitalmars-d-bugs mailing list