From: Sean O'Dell Date: 2003-11-20T05:22:02+09:00 Subject: Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) On Wednesday 19 November 2003 11:46 am, Chad Fowler wrote: > On Thu, 20 Nov 2003, Sean O'Dell wrote: > > # I'm clear on the subject of dynamic typing, and I'm not an advocate for > static # typing. Being a strong advocate for one or the other is foolish, > in my # opinion. Both are useful, and both can be employed here, so I BEG > you to # please employ SOME form of built-in interface checking. Having > absolutely NO # mechanism leaves people who need to check for certain > methods and parameters # hanging in the wind. > # > > If you really need something that bad, how about respond_to? If you need > something more robust, then there's types.rb by Eivind Eklund. Because something of this nature should be built-in. It's faster when written in C and doesn't have to be dynamically loaded via "require." I also don't believe type checking is something that there should be competing libraries for. Also, respond_to? doesn't say anything about what a method does or what parameters it takes. Checking for an implemented interface declares all of that. Sean O'Dell