From: Harry Ohlsen Date: 2001-12-11T08:00:33+09:00 Subject: [ruby-talk:28147] Re: The benefits of dynamic typing? In article <3C153282.9000309@vt.edu>, "Roy Patrick Tan" wrote: > Phil Tomson wrote: > >> then if I, or a user of these >> classes decide that they want a different kind of runnable object that >> performs a differnt function when 'run' is called, all they have to do >> is define another class of their own and make sure it's objects respond >> to 'run'. > > > This is somehow disturbing to me. "Run" is kind of ambiguous, and might > behave differently for different objects, whereas the caller of the > method expects "run" to behave in a certain way, shouldn't a > compiler/interpreter make sure that it *does* behave that way (ie check > the contract)? I was sold on strict typing for a very long time, because I believed it saved me from making mistakes. However, at this point, I definitely question the bang for buck. I'm absolutely certain that the number of times it may have saved me from myself do not add up to the amount of hassle it caused in terms of the time spent coding things "right" so that they'd compile. I've been coding in Ruby for almost exactly a year now and I can't think of one time when I've thought "If only the inheritance/interface was strongly typed I would have picked up that mistake much faster". As pointed out earlier, this is probably dependent on what you're coding most often.