Do we have to spell it out? Okay... V-O-T-E! Login and vote now.
By bloid
via pushing-pixels.org
Published: Aug 21 2007 / 12:11
Unlike with strong-typed languages (such as Java), Ruby doesn’t care about the actual type of the object being passed to a method, as long as it has all the methods that are used in that specific context. Leaving the relative merits and shortcomings of this approach aside for another entry, is this something that can be used in Java? Or, more interestingly, is it something that is used in Java? The answer is quite simple - yes. And not in third-party code; in the JDK itself.
Comments
herval replied ago:
please, no IMayBeSomething interfaces... pleeease...
Kirill Grouchnikov replied ago:
???
michaelklishin.myopenid.com replied ago:
Ruby is strong-typed, it is. It's not statically typed. Go read Wikipedia on this before posting.
Voters For This Link (12)
Voters Against This Link (4)