On Fri, 28 Jan 2005 13:48:17 +0900, Curt Sampson <cjs / cynic.net> wrote:
> On Fri, 28 Jan 2005, Austin Ziegler wrote:
> 
> > ...I hate any language that requires me to type stuff just to help
> > the compiler...
> 
> Me too. This is why I'm proposing that we have systems where the
> compiler figures this out for us.
> 
> > static typing and such type checking is NOT for us,
> > the programmers, but for the compiler.
> 
> I'm not quite sure what you mean by "static typing," but type checking
> is for us, the programmers. One of the things that is good about Ruby is
> that it does thorough type checking--it is a strongly typed language.
> 
> > ...the moment that some fool library writer decides that they want
> > something that *is* an IO object, it will no longer be possible to
> > pass in a StringIO object (it doesn't inherit from IO, and IO isn't
> > a module) or even a specially modified Array or String or some other
> > object.
> 
> Any "fool library writer" can do that now:
> 
>      raise "wrong type" unless arg.class <= SomeClass
> 
> I agree doing that would be silly. But this has no relevance; I'm
> talking about types, not classes.
> 

It's relevant to me. Sure if sucks less if someone is insisting on a
type rather then a class, but it still sucks. It's pretty common in
Ruby to rely on on pseudo-types such as objects that implement #to_s.

> Given that you are objecting to the direction I'm proposing whilst being
> unaware that you're agreeing with me on key points and possibly even
> unaware that you're already using type checking, I would suggest you go
> do some research on type systems before commenting further.
> 
> Here's the start on your research: find out why Class.class method is
> deprecated in favour of Class.type.
> 

I just looked..
Class.type is deprecated in favour of Class.class

> It's quite common that someone who doesn't understand an advanced
> langauge feature (usually because it's not in any of the languages he
> uses) will object to it through ignorance, only to be unable to live
> without that feature once he starts using it. Garbage collection was
> once considered slow, inefficient and unreliable. Would you like to take
> GC out of Ruby?
> 
Garbage collection was slow, inefficient and unreliable. Times change.

And it's quite common for someone who uses a feature from another
language to not be able to let go :).

Lisp and Smalltalk have had this type debate for years. If I recall,
the sides are seperated by opinion, not ignorance.

> cjs
> --
> Curt Sampson  <cjs / cynic.net>   +81 90 7737 2974   http://www.NetBSD.org
>       Make up enjoying your city life...produced by BIC CAMERA
> 
> 

Regards,
Nick
-- 
Nicholas Van Weerdenburg