digitalmars.D.bugs - [Issue 4660] New: Different writeln output for lazy sequences
- d-bugmail puremagic.com (32/32) Aug 17 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4660
- d-bugmail puremagic.com (10/10) Jan 09 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4660
- d-bugmail puremagic.com (7/7) Jan 09 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4660
http://d.puremagic.com/issues/show_bug.cgi?id=4660 Summary: Different writeln output for lazy sequences Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc This D2 program uses writeln to print a lazy sequence of integers: import std.stdio: writeln; import std.algorithm: map; void main() { auto r = map!q{a+1}([1, 2, 3]); writeln(r); } Output with dmd 2.048: [2, 3, 4] But when I print a lazy sequence I'd like some cue in the textual output that the data being printed isn't an array. In theory the delimiters can just be omitted for lazy sequences, but then if you print a collection of lazy sequences you can't where one sequence ends and the successive ends. So it's better to use delimiters, but different ones. So this is a possible better output: (2, 3, 4) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 17 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4660 Andrei Alexandrescu <andrei metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |andrei metalanguage.com AssignedTo|nobody puremagic.com |andrei metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4660 Now I think that a better output is: [2; 3; 4] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2011