Postfix type notation - readability and parsing?

Paul Backus snarwin at gmail.com
Wed Mar 6 03:03:19 UTC 2019


On Tuesday, 5 March 2019 at 22:29:33 UTC, aliak wrote:
> 3) Splitting it over multiple lines like:
>
> static immutable Option!(
>     ushort,
>     "p|port",
>     "Sets the port used for serving.",
>     "PORT",
>     8888
> ) port;
>
> Turns a potentially X line file in to a X * 10 line file, and 
> you have scroll just to see what all the variables are

I actually think this version looks the best out of all the 
examples you've given. In fact, I'd probably split the 
declaration over multiple lines even if the type were placed on 
the right.


More information about the Digitalmars-d mailing list