From: "David A. Black" Date: 2005-04-26T10:52:40+09:00 Subject: Re: Announcing Reg 0.4.0 Hi -- On Tue, 26 Apr 2005, vikkous wrote: > itsme213 said: >> - have you thought about the connection to duck typing? > > Christian Neukirchen said: >> How does it compare to the ML style of argument matching, btw? > > I think you're both talking about the same thing here; the ability to > dispatch to different methods depending on the types of method > parameters other than just the receiver. I have thought a good deal > about this, in fact, but not exactly in the context of Reg. I'm not sure about Christian, but I think itsme213 meant sort of the opposite: how does your system relate to the duck-typing environment of Ruby, where type != class (i.e., an object's capabilities and its class's instance methods are not necessarily the same thing)? Are you thinking of extending the system so that it could match, for example, "an array of objects that respond to '[]'" (or something along those lines)? One could imagine that being useful -- though on the other hand, duck typing per se, as I understand it, really means just requesting action from objects without a lot of preliminary querying and measuring (whether it be is_a?, respond_to?, or whatever). So a system like yours might be part of a fundamentally different way of handling these things -- though respond_to?-awareness might be an nice sort of middle ground. At least I think that's what he meant, and even if not, it would be interesting to hear your thoughts on it :-) David -- David A. Black dblack@wobblini.net