Actually, you inverted my thought.  I am not interested in types on
variables, but type (hints) on method signatures.

def foo(name<String>, age<Fixnum>)
  ...
end

This way a WSDL generator could generate a description of the method
that included types...again, not interested really in Ruby checking
types as variables are passed in...think of it as metadata or comments.
And I don't want this done in a separate file (like OLE/COM) because it
makes refactoring a pain.  Of course, some mechanism for being able to
reflect on this metadata would need to be included in the interpreter so
I could do something like:

m = method(:foo)
m.arity #=> 2
m.variables #=> ["name", "age"]
m.types #=> [String, Fixnum]

-rich

> -----Original Message-----
> From: William Djaja Tjokroaminata [mailto:billtj / z.glue.umd.edu] 
> Sent: Thursday, September 26, 2002 5:17 PM
> To: ruby-talk ML
> Subject: Re: adding overload to ruby
> 
> 
> Hi, great, I have someone with the same interest.  My idea is simple:
> 
> 1) First, we all love Ruby, right?  So there must always be 
> untyped variable like in the current Ruby, so we can simply write
> 
>     a = 10
> 
> 2) Now, all those class names (at least the built-in classes) 
> will also be keywords in declaring variables:
> 
>     Fixnum a
>     a = 10    # fine
>     a = 'abc' # --> run time syntax error
>     b = 'abc' # fine, b is "untyped"
> 
> All the Ruby internal object models stay the same.  Only the
> parser/interpreter will have to work harder in keeping the 
> type of each   
> variable and checking when assignment is being made.
> 
> Of course, we can later decide whether the checking is based 
> on "instance_of?" or "kind_of?" or even a mix of the two; but 
> that is secondary.
> 
> Regards,
> 
> Bill 
> ==============================================================
> ============
> Rich Kilmer <rich / infoether.com> wrote:
> > Well, I would like the idea of optional typing in one instance...to 
> > publish a WSDL file for a Ruby class (as a web service) you 
> need the 
> > types of the parameters...in other words, if Ruby is going 
> to be used 
> > as a producer of WSDL/SOAP web services, types are needed 
> to allow it 
> > to interact with all those statically-typed languages.  So, 
> if Matz is 
> > going to add some sort of type 'hinting' it would be nice 
> to access it 
> > through reflection...somehow ;-)
> 
> > -rich
> 
> >> -----Original Message-----
> >> From: William Djaja Tjokroaminata [mailto:billtj / z.glue.umd.edu]
> >> Sent: Thursday, September 26, 2002 3:57 PM
> >> To: ruby-talk ML
> >> Subject: Re: adding overload to ruby
> >> 
> >> 
> >> Why not designing a new language with a mix of typed variable
> >> and untyped data?
> >> 
> >> Regards,
> >> 
> >> Bill
> 
> 
>