Beta 2.079.0

psychoticRabbit meagain at meagain.com
Fri Feb 23 02:32:19 UTC 2018


On Friday, 23 February 2018 at 01:53:45 UTC, Martin Nowak wrote:
> On Friday, 23 February 2018 at 01:16:24 UTC, Jonathan M Davis 
> wrote:
>> I can sympathize with wanting to avoid bikeshedding, but 
>> almost no one who has posted thinks that this is a good idea.
>
> This was meant for the discussion of a new syntax for selective 
> imports like `import mod : { sym1, sym2 }` which seems like too 
> much churn to be worthwhile.

import mod : { sym1, sym2 }

thats not nice syntax - for these reasons:

first, why is the : needed? {} is enough to enscapsulate the 
intention.

second, why are using {} instead of []

[] would allow me to think of selective importing, as though I 
were importing an array of selections.

e.g:
import std.stdio, std.whatever[this, that], std.somethingelse, 
std.grr[wtf];

so using [] would be consistent with using array like syntax 
elsewhere in D, and would require no additional effort to think 
about.




More information about the Digitalmars-d-announce mailing list