A personal nit here - I've played with
tieing to provide hard encapsulation and found that it slowed down accessing the object by at least 50%. I wasn't limiting myself to just validation, but
tie creates a lot of overhead. Frankly, I don't see the sugary benefits here outweighing the large performance hit. I do a lot of CGI work where SLA's have to be met and hardware simply will not be increased this year. Performance, while not the first priority, simply
cannot be the last priority. I use OO for maintainability. I don't want it to also become a liability.
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.