Inline imports redivivus

Tejas notrealemail at gmail.com
Sun Mar 13 12:47:05 UTC 2022


On Sunday, 13 March 2022 at 08:37:15 UTC, Dom DiSc wrote:
> On Sunday, 13 March 2022 at 08:23:52 UTC, Dom DiSc wrote:
>> So any new feature is here totally superfluous IMHO.
>
> And btw. foreach doesn't even introduce a new scope, so you 
> can't get your import more local than in my version, no matter 
> what new syntax you invent.

`foreach` **does** introduce a new scope

I believe it is `static foreach` that **doesn't** introduce a new 
scope(hence why you see `static foreach(){{ /*code/* }}` style 
code sometimes


More information about the Digitalmars-d mailing list