Hi -- On Thu, 20 May 2004, Sean Russell wrote: > matz / ruby-lang.org (Yukihiro Matsumoto) wrote in message news:<1084872320.683534.4537.nullmailer / picachu.netlab.jp>... > > I buy the flexibility from dynamic typing at the cost of compile-time > > type check. I don't think I am going to change my mind. > > I want to make sure we're all on the same page. > > My proposed solution is to have Ruby do a duck-typing check as part of > the syntax checker ("-c"). This would be duck-type inferrence, so it > doesn't require the programmer to declare variables or give them > types. It would simply raise a warning if someone tries to call > "5.collect". That is, ruby will load the parse tree as it does with > -c, and then check to make sure that method calls are consistant with > expected duck types. I think "expected duck types" may be a contradiction in terms :-) Actually there's no reason not just to say: consistent with expected types, since "duck type" is essentially a description of how Ruby objects' types work. In other words, the question of whether or not a given object responds to a given message is (already, without 'duck') a question about its type. David -- David A. Black dblack / wobblini.net