Postfix type notation - readability and parsing?

aliak something at something.com
Thu Mar 7 19:43:31 UTC 2019


On Wednesday, 6 March 2019 at 08:09:48 UTC, Simen Kjærås wrote:
> On Wednesday, 6 March 2019 at 07:53:42 UTC, Simen Kjærås wrote:
>> alias port = Option!(immutable ushort, "p|port", "Sets the 
>> port used for serving.", "PORT", 8888);
>
> Of course, one issue is the lack of __GENSYM__, meaning that 
> this will only declare one variable, with two aliases:
>
> alias a = Option!(int, "", "", "", 0);
> alias b = Option!(int, "", "", "", 0);
>
> unittest {
>     assert(&a == &b);
> }
>
> --
>   Simen

Thanks for that code above!

And hmm.. __GENSYM__ ... is this documented anywhere? (I found a 
post by you on the forum about it but nothing in the docs)


More information about the Digitalmars-d mailing list