[Issue 10041] ufcs writeln of associative array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 7 18:22:05 PDT 2013


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



--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2013-05-07 18:22:04 PDT ---
(In reply to comment #2)
> A mostly unrelated question. Python dict formatting uses a space after the
> colon, probably to increase readability:
> 
> >>> {1:2, 2:3}
> {1: 2, 2: 3}
> 
> I kind of like that extra space. Is it a good idea to add it to D AA
> formatting?

I have no argument about the space after colon...

void main() {
    import std.stdio;

    // Fixed a while ago
    pragma(msg, [1, 2]);    // [1, 2]
    writeln([1, 2]);        // [1, 2]

    // Currently different output between compiler and std-lib
    pragma(msg, [1:1, 2:2]);    // [1:1,2:2]
    writeln([1:1, 2:2]);        // [1:1, 2:2]
}

Both compiler and Phobos prints no space after colon. Currently it is
consistent.

But, I can argue that compiler should insert a space after comma in AA literal
printing.

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