On Friday, 23 February 2018 at 11:57:05 UTC, Martin Nowak wrote:
Furthermore there remain various ideas that would avoid the original ambiguity. Whether such changes are worthwhile is up for discussion and would benefit from someone taking the lead.

I really like psychoRabbit's array syntax suggestion. I see no reason the old syntax can't be kept around only for trailing symbols, while requiring the array syntax for selective import chains.

I still think that local imports are nice for being explicit and toolable but have the downside of being brittle. Something like bash style expansion could help to hit a sweet spot IMHO.

    import std.{algorithm : {find, findSplit}, stdio : writeln};
import std.experimental.allocator.building_blocks.{free_list, region};

But certainly anything in that direction requires time and research, which I don't have for that topic.

Sure, it will require someone willing to implement it, not you.

In hindsight the voting experiment on https://github.com/dlang/dmd/pull/6589 might have prevented useful early feedback and thinking.

Given the effort required for a language change, it's seductive to streamline seemingly small changes, but it certainly increases the risk of design mistakes, thanks for appealing against this one.

Reflecting further on your pull during this debate, my initial suggestion that it would cause a bunch of errors was probably overblown, readability is the main issue. The ambiguity you expanded on was fine if only limited to one set of trailing symbols, it became too hard to parse when a bunch of selective imports were chained.

I hope someone steps us to implement this feature with better syntax, though it will require more effort than your simple patch, as I do see the need for it.

Reply via email to