[Issue 4660] Different writeln output for lazy sequences

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 15 04:14:05 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=4660

--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> ---
writeln formats all ranges by using the style [a, b, ...]. And array is a range
in D.

Additionally, writeln always evaluate all range elements to print them. So, the
range laziness is meaningless when you want to print it. So they are printed by
using same style by default.

If you want the semicolon-separated style, use the format specifiers "%( ... %|
... %)".

--


More information about the Digitalmars-d-bugs mailing list