Hmm - about manifest/enum

Mike vertex at gmx.at
Fri Dec 28 19:46:19 PST 2007


Seems like we're running in circles again.

So I simply have to ask this:

Wouldn't it be better to ditch the _whole concept_ of constness and come  
up with some thing else that actually solves problems instead of being an  
endless stream of new problems, arguments and confusion? After all this  
time it seems quite obvious that the problem here is constness itself, not  
the implementation. Didn't C++ fail to get it right? So maybe that's proof  
that the whole concept is flawed and that D won't get it right either.

What problem does constness solve anyway? Manifest const, read-only  
access, const values/references ... aren't this unrelated concepts that  
are shoehorned into one single syntax that doesn't fit?

Maybe it's time for some other approach - borrow C#'s property syntax, let  
properties stand free and make them "private scope". Borrow Pascal's ":="  
operator - this will mean "I define a manifest constant". Ok, please don't  
take that too seriously, but the more discussion about const we have the  
less faith I have that const will work in D.

-Mike

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list