Beta 2.079.0
Joakim
dlang at joakim.fea.st
Wed Feb 21 15:33:02 UTC 2018
On Tuesday, 20 February 2018 at 08:43:50 UTC, Martin Nowak wrote:
> On Monday, 19 February 2018 at 15:58:57 UTC, Joakim wrote:
>> 17. Allow multiple selective imports from different modules in
>> a single import statement
>>
>> I have a bad feeling that that one is going to be a source of
>> a raft of bugs for years to come.
>
> No need to use it if you don't like it.
I don't think I will.
> It's particularly useful for small examples, localized imports
> and hacking.
Eh, the problem is it won't be used just for that.
> It's mainly a generalisation of the existing possibility to mix
> module imports and one selective import at the end.
Yes, I recognize the need for something like that, as I too have
been annoyed that I had to split up import lines when adding
selective symbols.
> If you prefer java-like 50 lines import manifests, then by all
> means keep using those.
I don't, but there's a clarity to those that's not there with
this.
> How would that feature cause bugs though?
Two ways I can think of, first, local imports was supposed to be
a small change and yet here we are fixing symbol leaks with it
_years_ later. Looking at your patch now, it's so small that
maybe it won't have those problems.
The other are the ambiguity and readability issues that others
have already mentioned, that will trip up D devs for years to
come.
I thought about chiming in on that PR when it was open, but
didn't because the vote was split at 5-5 and I thought it
wouldn't get merged. Also, I'm not against the idea in
principle, but I do wish you'd chosen better syntax, such as not
reusing the comma to split modules too. I don't have a better
separator suggestion though, `|`?
More information about the Digitalmars-d-announce
mailing list