From: Chad Fowler Date: 2003-11-20T06:01:54+09:00 Subject: Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) On Thu, 20 Nov 2003, Sean O'Dell wrote: # 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. ...in your minoority opinion. # 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. Why not? By the way, I think types.rb is the only library that actually *does* type checking in the accurate ruby sense. # 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. As demonstrated previously in this thread, class and/or module inheritance checking *doesn't* give you any info about what a method does or what parameters it takes.