From: Austin Ziegler Date: 2003-11-20T09:24:58+09:00 Subject: Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) ) On Thu, 20 Nov 2003 08:21:34 +0900, Sean O'Dell wrote: > On Wednesday 19 November 2003 03:04 pm, Austin Ziegler wrote: >> It's also a lie. MyFakeRuwikiClass doesn't implement the >> necessary interface. And *that*, Sean, is why name checking *of >> any sort* is useless. MyFakeRuwikiClass says that it's a >> RuwikiClass, but it isn't. > But to a person passing in a unsuitable object, it notifies them > "hey, you need this object here." Right now, you just get deep > errors. Either way, you can lie and force in anything you want. > The initial error message gives you a heads-up, though. So does the existing one: foo.backend NoMethodError: undefined method `backend' for # I know that there's no backend method defined. If I'm mocking up Ruwiki, then I better know what #backend is. I'll also get a specific line where it's been called. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.11.19 * 19.22.06