On Wednesday, 28 December 2016 at 23:14:48 UTC, Andrei Alexandrescu wrote:
On 12/28/16 10:48 AM, deadalnix wrote:
On Saturday, 24 December 2016 at 15:44:18 UTC, Andrei Alexandrescu wrote:
A compiler enhancement can do this _without_ a language change.

The language addition has additional benefits as described by DIP1005.
-- Andrei

Yes, question is, are these specific benefits worth adding a language
change ?

Right now you got :

A/ No language change, get X.
B/ Language change, get X and Y.

It stand to reason that B should be evaluated on the benefit provided by Y, and Y only, rather than X and Y, as X can be provided without the
language change.

This is exactly what the DIP describes in detail. It consecrates sections to alternatives. Is anything missing? -- Andrei

This was more a comment about the current discussion than the DIP. A lot of discussion effort was focused on performance, but most of it can be achieved without language change - as the DIP states.

I think the performance gain we are looking at here is marginal, and I don't expect people to change their code to get a marginal benefit, so I suggest the performance aspect of the change to be simply left aside.

So the question now is would the added expressivity of per declaration import be worth the language change. I have to admit I'm not convinced either way.

Finally, while I proposed a variation of the "with import" combo in the past, I'm now much more convinced that using the plain import syntax, without the ';' is better. I was afraid there was a syntax conflict, but it doesn't looks like there is one. This will not introduce a new syntax, but allow an existing one to be used in a new location. This is, IMO, much more valuable.

Reply via email to