From: martindemello@... (Martin DeMello) Date: 2002-10-17T02:44:23+09:00 Subject: Re: final in ruby "Gavin Sinclair" wrote in message news:<030e01c2739d$343eb620$666332d2@nosedog>... > How would your method get overwritten anyway? (I know it's possible, so in > some sense it's a rhetorical question, but by answering it we can discuss some > design philosophies.) > > I have some sympathy for your concern, but I have learned to adopt the > following attitudes: > - if other people overwrite my method, that's their business; the > warranty is void > - if I overwrite my own method *accidentally*, I either have a messy > design, a bad approach, or a small brain :) For what it's worth, that was the same revelation that made me stop compulsively checking argument types in my 'utility' classes. I decided that I was doing inherently single-programmer stuff, and anyone else using the class would *also* be doing single-programmer stuff; there would never be an issue of, say, two people independently modifying code in the same runtime program. Therefore, there was a definite 'end user' programmer, and it was up to them to see that all their arguments had the proper functionality. Saved a lot of useless (and ugly) ifs and asserts. martin