From: Austin Ziegler Date: 2003-11-20T12:56:16+09:00 Subject: Re: "stereotyping" On Thu, 20 Nov 2003 10:17:36 +0900, Sean O'Dell wrote: > On Wednesday 19 November 2003 04:22 pm, Eric Schwartz wrote: >> But it doesn't clear the air, it only pretends to, and only in >> some cases. > But, as with Ruby's dynamic typing, that's good enough. [...] It > follows then that an interface declaration system would work the > same way. [...] An interface declaration system is useless unless it's used. I frankly don't see ever using it in my libraries. > This is why I feel the worry over half-implemented interfaces is > unfounded. This isn't a static typing system, it's just a > declaration system. The same is achieved through Ruby without an unnecessary declaration system. > What I think is that so many people have expounded for so long on > dynamic typing that it's hard to admit that perhaps there's a > benefit to something resembling type checking. Apparently there is > too much invested in dynamic typing to compromise. Incorrect. > I give up here, if that's the case. I never close my mind to > anything, and it seems that most people here are simply closed to > the idea of anything resembling type checking. Wrong. The reasons for not thinking that your proposal is useful have been discussed several times. It is not a value-add. If there's going to be an interface declaration system, it should be (a) easy to use, and (b) optionally enforce the contract. Your system doesn't do (b) and that makes it even worse because it's got a nonzero mental cost when the alleged promise is broken. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.11.19 * 22.56.08