const correctness

Posted Oct 18, 2005 12:21:00 PM

Here's a very thorough article that supplements my recent const rant very nicely. I received a number of emails back arguing against my point that const is important and influential. While I realize that many developers maintain that const-correctness is a waste of time, I maintain that those people are unskilled and lazy ;).

Developing classes that are not const-correct severely limits its usage in well thought out applications, if for no other reason than that a constant instance of your class is unusable! You can't call non-const methods on const instances, nor can const-methods access non-const (or non-mutable) members. It's just plain lunacy to not keep const in mind when developing a solid object oriented system.

Popular Tags

Recent Stories

${recent.title}

About

My name is Tim Fanelli, I am a software engineer in Northern NY. I spend most of my time working, and when I can, I try to post interesting things here.

Cigar Dossiers