Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
September 05, 2013 std.regex.Stack | ||||
---|---|---|---|---|
| ||||
Today, I was surprised to discover that std.regex has a public stack implementation (std.regex.Stack). Is this intended to be public? It's causing a conflict with my code, and I found it strange that importing std.regex should declare a type called 'Stack'.
I'm refraining from filing a bug for now, just in case there's a good reason for this that I didn't think of.
T
--
Without outlines, life would be pointless.
|
September 05, 2013 Re: std.regex.Stack | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Thursday, 5 September 2013 at 22:49:49 UTC, H. S. Teoh wrote: > Today, I was surprised to discover that std.regex has a public stack > implementation (std.regex.Stack). Is this intended to be public? It's > causing a conflict with my code, and I found it strange that importing > std.regex should declare a type called 'Stack'. The declaration is not public - there is a "private:" line at the top of the file, and the module declares its public symbols explicitly. Conflicts between public and private symbols is a long-standing problem of D: http://d.puremagic.com/issues/show_bug.cgi?id=1238 http://wiki.dlang.org/DIP22 |
September 06, 2013 Re: std.regex.Stack | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | 06-Sep-2013 03:11, Vladimir Panteleev пишет: > On Thursday, 5 September 2013 at 22:49:49 UTC, H. S. Teoh wrote: >> Today, I was surprised to discover that std.regex has a public stack >> implementation (std.regex.Stack). Is this intended to be public? It's >> causing a conflict with my code, and I found it strange that importing >> std.regex should declare a type called 'Stack'. > > The declaration is not public - there is a "private:" line at the top of > the file, and the module declares its public symbols explicitly. > > Conflicts between public and private symbols is a long-standing problem > of D: > > http://d.puremagic.com/issues/show_bug.cgi?id=1238 > http://wiki.dlang.org/DIP22 LOL I couldn't stress the importance of that bug better :) Time to make private symbols invisible outside! (isn't that what module-level encapsulation was all about) https://github.com/D-Programming-Language/dmd/pull/739 -- Dmitry Olshansky |
September 06, 2013 Re: std.regex.Stack | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Thursday, 5 September 2013 at 23:11:21 UTC, Vladimir Panteleev wrote:
> Conflicts between public and private symbols is a long-standing problem of D:
Wow! O_o
|
September 06, 2013 Re: std.regex.Stack | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gary Willoughby | On Friday, 6 September 2013 at 18:16:18 UTC, Gary Willoughby wrote:
> On Thursday, 5 September 2013 at 23:11:21 UTC, Vladimir Panteleev wrote:
> Wow! O_o
Yes. The compiler has been progressing since '99. O_o
|
Copyright © 1999-2021 by the D Language Foundation