|There's more than one way to do things|
Re: Re: Re: Class automators should be standardby rkg (Hermit)
|on Jan 14, 2004 at 20:52 UTC ( #321364=note: print w/replies, xml )||Need Help??|
Ok, I'l agree with your point about making the computer do the boring repetitive stuff.
But back to my question:
How do you handle getter/setters when the attributes interact? In your shipping example, what would keep me from (assuming I understand the methods correctly) setting from_state to Massachusetts and is_from_west_coast to TRUE? Shouldn't setting the state cause the west coast flag to flip on or off as appropriate?
A handrolled get/set could enforce all these things; doesn't C:MM fall short here?
I am not C:MM bashing; I use it and am a fan; I just haven't figured out how to handle interrelated attribs yet.
Thanks for your comments
In Section Meditations