On Fri, 28 Jan 2005, Nicholas Van Weerdenburg wrote: > It's relevant to me. Sure if sucks less if someone is insisting on a > type rather then a class, but it still sucks. Then you must think that Ruby really sucks, because ruby does indeed insist on a type, and generates an exception if you pass into a method an object of the wrong type. See for yourself: irb(main):001:0> def second(o) o[2]; end => nil irb(main):002:0> second([1, 2, 3, 4]) => 3 irb(main):003:0> second("abcd") => 99 irb(main):004:0> second(1.75) NoMethodError: undefined method `[]' for 1.75:Float from (irb):1:in `second' from (irb):4 > I just looked.. > Class.type is deprecated in favour of Class.class Right. Typo on my part. But why is it deprecated? > Garbage collection was slow, inefficient and unreliable. Times change. Right. And when decent type systems are fast and efficient, as they already are in some langauges, where will Ruby be? > Lisp and Smalltalk have had this type debate for years. If I recall, > the sides are seperated by opinion, not ignorance. There is no debate about typing itself. Both Lisp and Smalltalk are, like Ruby, strongly typed langauges. Smalltalk, like Ruby, is pretty darn poor about how it deals with types. Lisp, it depends on the dialect, and I'm not so familiar with it. Basically, when Ruby can find out that you have a type error fairly early on, it doesn't. It just says, "too bad, I'm going to wait until the very last minute possible before I point out this problem to you." Worse yet, not only can Ruby not figure out earlier on that there's a problem in any case whatsoever, but even when I can tell it how to figure out that there's a problem, Ruby can't do anything with that information. cjs -- Curt Sampson <cjs / cynic.net> +81 90 7737 2974 http://www.NetBSD.org Make up enjoying your city life...produced by BIC CAMERA