Why I'm Excited about D
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 7 15:29:26 PDT 2015
On 4/7/15 3:27 PM, deadalnix wrote:
> 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...
(I assume you meant "dg" here.)
This doesn't strike me as big, but it is weird.
> Note that even phobos can get confused with that one in some cases.
Are there bugzillas for these two matters?
Andrei
More information about the Digitalmars-d
mailing list