From: Julian Snitow Date: 2003-03-31T16:33:26+09:00 Subject: Re: inspect question/request Yukihiro Matsumoto wrote: > Hi, > > In message "Re: inspect question/request" > on 03/03/31, Julian Snitow writes: > > |> Who wants to undef "inspect"? > | > |If something, no matter how stupid, is possible, then someone, somewhere > | will do it. > | > |Perhaps in the absence of an inspect method (for whatever reason), a > |fall-back to the original behavior is in order? > > I know. I did it once, and asked myself how often it occurs, and how > much it cost to cover it, then removed fall back code. Was I wrong? > > matz. > I doubt that the test would affect the performance of correct code if it's performed in the error-handling routine (unless there's an obscure implemetation detail that I'm overlooking :-), and it seems to me that being able to "fail correctly" is important in a language that allows graceful recovery from exceptions. If, on the other hand, there were an actual performance hit for *non*-buggy code (i.e., code that doesn't call non-existent methods very often), then that would be another matter entirely. :-)