From: Joao Pedrosa Date: 2005-01-30T09:17:39+09:00 Subject: Re: Ten Things Every Java Programmer Should Know About Ruby Hi, On Sun, 30 Jan 2005 08:57:11 +0900, Navindra Umanee wrote: > Joao Pedrosa wrote: > > I think you have the right to want static typing in Ruby. That said, > > from the user point of view, you can say that something is not > > something, because the details of the language are hidden from the > > user. Of course that you want "something" strong, powerful, supported, > > etc. That's why you prefer Java, right? :-) > > Me? No, I don't prefer Java. I very much enjoy languages like Ruby > and Lisp. > > I only seek to understand. There are confusing terms. Anyway, I think this website has some description of it: http://www.artima.com/forums/flat.jsp?forum=32&thread=3572 Like: ---quote--- Strong/Weak: how easy it is for a programmer to circumvent the type system because he knows better. C is "weak" in this sense, while Java, Eiffel, etc. are "strong". However, so are Python, Smalltalk, Ruby, etc. C++ is weak mainly because it inherits C-style casts and void *. Note that Java's type casting doesn't weaken the type system, in that a cast fails immediately with a ClassCastException. In C, casting an int to a void* always succeeds, whether it really makes sense or not ... Static/Dynamic: whether variables and formal parameters have types fixed at compile-time, or whether the type of a variable depends on the run-time type it currently contains. This is what most people mean by "strong" or "weak" typing. C, C++, Java, Eiffel, etc. are static, Python, Smalltalk, Ruby, etc. are dynamic. Note that polymorphic method dispatch implies some dynamism, so many of the "static" languages aren't completely static. Manifest/Implicit: whether each variable must have a type declaration or not. Most static languages have manifest types, and most dynamic languages have implicit types. However, there are exceptions: Haskell and the dialects of ML can infer the type of any variable based on the operations performed on it, with only occasional help from an explicit type. Also, the GNU/NeXT/Apple extensions to Objective-C permit optional manifest typing. -------------- Regards, Joao