Feature or bug: print braces
Brian Schott via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 13 17:33:32 PDT 2015
On Thursday, 14 May 2015 at 00:29:06 UTC, Dennis Ritchie wrote:
> Why doesn't the compiler produces an error?
>
> -----
> import std.stdio;
>
> void main() {
> writeln({});
> }
> -----
> http://ideone.com/qTZCAd
You told it to output a function literal, so it did.
(That or you told it to output a struct literal, but the compiler
has arbitrarily decided that it's a function literal. This is NOT
my favorite part of D's grammar.)
More information about the Digitalmars-d-learn
mailing list