www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Are static useful?

reply renoX <renosky free.fr> writes:
Hello,

Maybe some will find this blog useful: the author thinks that language 
would be better without statics:

http://gbracha.blogspot.com/2008/02/cutting-out-static.html

Regards,
renoX
Jun 08 2008
parent Robert Fraser <fraserofthenight gmail.com> writes:
renoX wrote:
 Hello,
 
 Maybe some will find this blog useful: the author thinks that language 
 would be better without statics:
 
 http://gbracha.blogspot.com/2008/02/cutting-out-static.html
 
 Regards,
 renoX
I'm not sure what he means by "static" in that article, but I guess he means any global state ("static" variables in Java, which he seems to be referring to, are jut namespaced global variables). I agree that global variables have issues, but to answer the question in your title, they ARE useful (certainly the "singleton pattern" is not an improvement).
Jun 08 2008