D idioms list

Szymon Gatner via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jan 8 03:45:28 PST 2015


On Thursday, 8 January 2015 at 11:43:30 UTC, ponce wrote:
> On Thursday, 8 January 2015 at 11:41:43 UTC, Szymon Gatner 
> wrote:
>>>> 
>>>> Question:
>>>> 
>>>> Where did this syntax came from? It is not documented for 
>>>> 'import' keyword.(first time I see that D has built-in 
>>>> resource compiler):
>>>> 
>>>> ubyte[] sdlBytes = cast(ubyte[]) import("SDL2.dll");
>>> it is documented: 
>>> http://dlang.org/expression.html#ImportExpression
>>> it's a nice D habit of overloading keywords.
>>
>> Ah, thanks. Follow up then: can such imported string be used 
>> for mixin?
>
> Yes.

That is pretty damn cool then.


More information about the Digitalmars-d-announce mailing list