[Issue 4533] Ban public aliases to private symbols

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 29 16:54:41 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4533


Leandro Lucarella <llucax at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llucax at gmail.com


--- Comment #2 from Leandro Lucarella <llucax at gmail.com> 2010-07-29 16:54:37 PDT ---
The problem is, attributes in D are not as in Java, they can be applied to a
lot of symbols, like:

---
private int j;

public:

int i;
// another bunch of stuff
alias j k;
---

Should the compiler complain at that alias? What about this:

---
void f() {}

extern (C):

void g() {}
// another bunch of stuff
alias f h;
---

Should the compiler complain about non-sense extern (C) alias? What about
const? You can "revert" the extern (C) with extern (D) and public with private,
but there is no "mutable" to revert const.

This is a bigger problem on how attributes work in D, and there were some
threads about the issue.

And I'm not saying I'm against issuing error when attributes are applied to
things that doesn't make sense, I'm just sharing some problems about the issue
:)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list