From: gwtmp01@... Date: 2006-08-08T08:02:11+09:00 Subject: Re: How to react on nil or wrong object-type as parameter On Aug 7, 2006, at 5:37 PM, Yochen Gutmann wrote: > Sorry Michael, that I didnt make myself clearer. Yes, it is not > intendet > that such a non-portfolioed client can be called upon > handle_client_well. Thus the question is how to aovid this wrong > usage. > Seemingly it cant (or at least only through a vast of checkings)). There is no way to magically prevent incorrect code from being written. You are framing the problem as if you want to detect the incorrect code at run time (i.e., when the code is in production) but it is too late to do anything about incorrect code at that point. Presumably you want to detect incorrect code *before* your code is running in production. In a dynamic language you have to do that via a good testing methodology since you don't have a compilation step to help you detect obviously incorrect code. Just to be clear, you have to do testing in a static/compiled language environment also since not all usage errors can be detected via compile-type checks. Gary Wright