Const template (was: Performance improvements for D / DMD compiler.)

Lionello Lunesu lionello at lunesu.remove.com
Sun Jan 21 06:52:05 PST 2007


"Andrei Alexandrescu (See Website for Email)" 
<SeeWebsiteForEmail at erdani.org> wrote in message 
news:eotmt2$2fru$3 at digitaldaemon.com...
> The reflection mechanism would have to provide the information whether
> or not a given member function changes the object.

How would that work? The difference between getters and setters is probably 
easy to see, but what about member functions calling non-member functions? 
Is the signature of that function (in,out,inout) enough to determine 
mutability? Sounds like a C++-style const afterall.

And how about the nested classes, or array members? I very much like the 
idea though: generating getters with the same name as the members, but that 
alone is not enough.

I get very confused thinking about this : S

L. 





More information about the Digitalmars-d mailing list