From: Avdi Grimm Date: 2008-04-08T06:25:16+09:00 Subject: Re: Method parameters Type On Mon, Apr 7, 2008 at 5:12 PM, Phillip Gawlowski wrote: > Ruby is? > > Doesn't look like it to me, since I can change the type of a variable > with ease. You're confusing static typing and strong typing. In a weakly-typed language, like C, it is possible to cast an integer as a, for instance, a char*, and then call string functions like sprintf() on it and the compiler will compile it, the runtime will run it, and it will wreak whatever havoc you please. Most high-level languages are strongly-typed, these days - neither Java or Ruby will allow you to call a String method on an Integer. You can assign whatever object you want to a variable in Ruby - hence *dynamic* typing - but that object will only ever allow you to call supported methods on it; otherwise you'll get a NoMethodError. Hence *strong* typing. -- Avdi