Why I'm Excited about D
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 7 15:27:27 PDT 2015
On Tuesday, 7 April 2015 at 22:24:21 UTC, Andrei Alexandrescu
wrote:
>> My current favorite WAT in D is:
>>
>> import std.stdio;
>> void fun(string text) {
>> import std.conv;
>> writeln(text);
>> }
>> void main() {
>> fun("Hello world");
>> }
>>
>> This program outputs a blank line. :-)
>
> Yeah, I think it's urgent we fix that. -- Andrei
My favorite next:
void function() f;
static assert(is(f == function)); // OK
void delegate() dg;
static assert(is(f == delegate)); // Nope...
Note that even phobos can get confused with that one in some
cases.
More information about the Digitalmars-d
mailing list