digitalmars.D.learn - private selective imports
- Vlad Levenfeld (17/17) Aug 06 2014 Is there any way to make selective imports private? I've got a
- H. S. Teoh via Digitalmars-d-learn (9/34) Aug 06 2014 I'd file a bug.
- Dicebot (1/1) Aug 06 2014 Most voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314
- sigod (2/4) Aug 06 2014 +1 vote from me.
- Gary Willoughby (3/5) Aug 06 2014 Yeah this is a famous bug that seems to catch everyone out at
- Vlad Levenfeld (4/6) Aug 06 2014 +1 from me as well.
- Jonathan M Davis (5/7) Aug 06 2014 Yeah, it's why I'd suggest that folks not use selective imports
- Dicebot (3/10) Aug 06 2014 scope-local selective imports are not affected
- Jonathan M Davis (6/18) Aug 06 2014 Sure, but people keep using them at the module-level, which
- Vlad Levenfeld (3/8) Aug 06 2014 I'm curious, what's the problem with it anyway? Judging by the
- H. S. Teoh via Digitalmars-d-learn (6/16) Aug 06 2014 My guess is that it requires knowledge of dmd internals that only few
- Dicebot (5/9) Aug 06 2014 Kenji has a PR with new symbol overload resolution system that
- H. S. Teoh via Digitalmars-d-learn (6/15) Aug 06 2014 So the way to proceed is to discuss overload resolution rules that
Is there any way to make selective imports private? I've got a name clash from importing an "all" module that has a bunch of public imports, one of which is circular, it goes sort of like this: module math.all; public: import geometry; import vectors; --- module vectors; struct Vector {} --- module geometry; import math.all: Vector; And then I get an error like: vectors.Vector conflicts with geometry.Vector Its the same Vector, though. What can I do?
Aug 06 2014
On Wed, Aug 06, 2014 at 06:19:34PM +0000, Vlad Levenfeld via Digitalmars-d-learn wrote:Is there any way to make selective imports private? I've got a name clash from importing an "all" module that has a bunch of public imports, one of which is circular, it goes sort of like this: module math.all; public: import geometry; import vectors; --- module vectors; struct Vector {} --- module geometry; import math.all: Vector; And then I get an error like: vectors.Vector conflicts with geometry.Vector Its the same Vector, though. What can I do?I'd file a bug. But obviously, you want a workaround in the meantime. I'll leave it to the module experts to answer that. ;-) (My module structures tend to be quite shallow and simple, so I haven't run into this problem myself yet.) T -- If you want to solve a problem, you need to address its root cause, not just its symptoms. Otherwise it's like treating cancer with Tylenol...
Aug 06 2014
Most voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314
Aug 06 2014
On Wednesday, 6 August 2014 at 18:33:23 UTC, Dicebot wrote:Most voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314+1 vote from me.
Aug 06 2014
On Wednesday, 6 August 2014 at 18:33:23 UTC, Dicebot wrote:Most voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314Yeah this is a famous bug that seems to catch everyone out at some stage.
Aug 06 2014
On Wednesday, 6 August 2014 at 18:33:23 UTC, Dicebot wrote:Most voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314+1 from me as well. This is unfortunate. D otherwise has a very comfortable import system.
Aug 06 2014
On Wednesday, 6 August 2014 at 18:33:23 UTC, Dicebot wrote:Most voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314Yeah, it's why I'd suggest that folks not use selective imports right now. But people seem to really love the feature, so they use it and keep running into this problem. - Jonathan M Davis
Aug 06 2014
On Wednesday, 6 August 2014 at 19:31:04 UTC, Jonathan M Davis wrote:On Wednesday, 6 August 2014 at 18:33:23 UTC, Dicebot wrote:scope-local selective imports are not affectedMost voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314Yeah, it's why I'd suggest that folks not use selective imports right now. But people seem to really love the feature, so they use it and keep running into this problem. - Jonathan M Davis
Aug 06 2014
On Wednesday, 6 August 2014 at 19:35:02 UTC, Dicebot wrote:On Wednesday, 6 August 2014 at 19:31:04 UTC, Jonathan M Davis wrote:Sure, but people keep using them at the module-level, which really shouldn't be done until the bug is fixed. IMHO, we'd be better off making it illegal to use selective imports at the module-level rather than keeping it as-is. - Jonathan M DavisOn Wednesday, 6 August 2014 at 18:33:23 UTC, Dicebot wrote:scope-local selective imports are not affectedMost voted DMD bug : https://issues.dlang.org/show_bug.cgi?id=314Yeah, it's why I'd suggest that folks not use selective imports right now. But people seem to really love the feature, so they use it and keep running into this problem. - Jonathan M Davis
Aug 06 2014
Sure, but people keep using them at the module-level, which really shouldn't be done until the bug is fixed. IMHO, we'd be better off making it illegal to use selective imports at the module-level rather than keeping it as-is. - Jonathan M DavisI'm curious, what's the problem with it anyway? Judging by the posts in the bug report and the bug's own lifespan this must be a real tough one to crack.
Aug 06 2014
On Wed, Aug 06, 2014 at 10:07:53PM +0000, Vlad Levenfeld via Digitalmars-d-learn wrote:My guess is that it requires knowledge of dmd internals that only few people have, and those few people have other fires to put out right now. T -- Be in denial for long enough, and one day you'll deny yourself of things you wish you hadn't.Sure, but people keep using them at the module-level, which really shouldn't be done until the bug is fixed. IMHO, we'd be better off making it illegal to use selective imports at the module-level rather than keeping it as-is. - Jonathan M DavisI'm curious, what's the problem with it anyway? Judging by the posts in the bug report and the bug's own lifespan this must be a real tough one to crack.
Aug 06 2014
On Wednesday, 6 August 2014 at 22:24:24 UTC, H. S. Teoh via Digitalmars-d-learn wrote:My guess is that it requires knowledge of dmd internals that only few people have, and those few people have other fires to put out right now.Kenji has a PR with new symbol overload resolution system that fixes it but Walter disagrees with proposed rules - at least that was the last state of this PR when I checked.
Aug 06 2014
On Wed, Aug 06, 2014 at 10:55:14PM +0000, Dicebot via Digitalmars-d-learn wrote:On Wednesday, 6 August 2014 at 22:24:24 UTC, H. S. Teoh via Digitalmars-d-learn wrote:So the way to proceed is to discuss overload resolution rules that Walter agrees with, then? T -- Without outlines, life would be pointless.My guess is that it requires knowledge of dmd internals that only few people have, and those few people have other fires to put out right now.Kenji has a PR with new symbol overload resolution system that fixes it but Walter disagrees with proposed rules - at least that was the last state of this PR when I checked.
Aug 06 2014