digitalmars.D.announce - Re: DMD 1.025 and 2.009 releases
- baaaam <nospam empty.com> Jan 13 2008
- Walter Bright <newshound1 digitalmars.com> Jan 13 2008
- baaaam <nospam empty.com> Jan 13 2008
- baaaam <nospam empty.com> Jan 13 2008
- Moritz Warning <moritzwarning web_nospam_.de> Jan 13 2008
1) is there any up to date documentation for the way const/invariant/enum works now ? 2) whats the use for the enum manifest stuff since it renders it even impossible to apply visibility attributes to const of that style. enum manifest consts are always "static public" as it seems.. Walter Bright Wrote:New const/invariant/enum in 2.009! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.025.zip http://www.digitalmars.com/d/changelog.html http://ftp.digitalmars.com/dmd.2.009.zip
Jan 13 2008
baaaam wrote:1) is there any up to date documentation for the way const/invariant/enum works now ?
Yes, click the links on "enum" and "const" on the documentation pages.2) whats the use for the enum manifest stuff since it renders it even impossible to apply visibility attributes to const of that style. enum manifest consts are always "static public" as it seems..
private enum i = 3;
Jan 13 2008
Walter Bright Wrote:baaaam wrote:1) is there any up to date documentation for the way const/invariant/enum works now ?
Yes, click the links on "enum" and "const" on the documentation pages.
so did anything change in the behaviour of const/invaraiant ? "Both invariant and const are transitive, .." -> i thought this is not the case ? wasnt there too many problems with it ? i am confused and i guess i am not the only one.2) whats the use for the enum manifest stuff since it renders it even impossible to apply visibility attributes to const of that style. enum manifest consts are always "static public" as it seems..
private enum i = 3;
this doesnt prevent anything from accessing that value of i. I testet it with dmd 2.009. struct Foo{ private enum i = 3; } every other piece of code can access i through "Foo.i" .
Jan 13 2008
Moritz Warning Wrote:On Sun, 13 Jan 2008 06:17:25 -0500, baaaam wrote:"Both invariant and const are transitive, .." -> i thought this is not the case ? wasnt there too many problems with it ? i am confused and i guess i am not the only one.
"Both invariant and const are transitive, .." - that's right (for D2.00x).this doesnt prevent anything from accessing that value of i. I testet it with dmd 2.009. struct Foo{ private enum i = 3; } every other piece of code can access i through "Foo.i" .
If you have two modules (= two files), they can't access each others private members.
right, thats exactly what i did and i was able to access that private member from another module. thats why i wondered, sounds like a bug huh ?
Jan 13 2008
On Sun, 13 Jan 2008 06:17:25 -0500, baaaam wrote:"Both invariant and const are transitive, .." -> i thought this is not the case ? wasnt there too many problems with it ? i am confused and i guess i am not the only one.
"Both invariant and const are transitive, .." - that's right (for D2.00x).this doesnt prevent anything from accessing that value of i. I testet it with dmd 2.009. struct Foo{ private enum i = 3; } every other piece of code can access i through "Foo.i" .
If you have two modules (= two files), they can't access each others private members.
Jan 13 2008