From: John Carter Date: 2008-05-29T09:40:16+09:00 Subject: Re: The duck's backside On Thu, 29 May 2008, David Masover wrote: > I'm fine with that, because 99% of the time, I'll never hit that exception. > When I do, it's usually possible to deal with it -- in this case, you would > find where @a is set, and add a check there. > > I think you're arguing to add that check first. I would call that premature > strictness -- but if you have to do it, I like your way. Depends on what I'm doing. If I'm just doing bog standard coding, I'll probably skip the checks. If I'm doing something wildly experimental, or ripping up and restructuring a large chunk of code, I'll probably splash checks around with a heavy hand. Gives me a quick heads up that I'm being stupid. Forces me to think a little, "what do I really want coming it here? I Dunno really, but it must quack like this. " Run the unit test, ooh looky, I'm getting something that doesn't quack like that. No, no surprise now I think about it, but it holds, has, or makes a thing that quacks like that. A quick fix in the editor and off I go again. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand