From: djberg96@... (Daniel Berger) Date: 2004-12-01T05:57:47+09:00 Subject: Optional static typing (or, What can Ruby 2.0 borrow from Boo?) Hi all, I was just looking at http://boo.codehaus.org/BooManifesto.pdf. One thing I really kinda like is the optional static typing. Wouldn't this allow potential compile time error checking and optimization with a virtual machine running things? I imagine the syntax looking something like this: def foo(String s, Hash h) ... end Keeping in mind that it could also be written as just: def foo(s,h) ... end If the types were not provided, then no compile time optimization or error checking would occur. What about an optional return type? Something like? def foo(s,h) returns String ... end And this could be mixed with the optional static typing: def foo(String s, Hash h) returns String ... end Everything else from the manifesto looks possible already in Ruby, except for the macros, which I know Matz opposes. Oh, and if it's not too late, I wouldn't mind replacing '@' with a single leading underscore for instance variables. :) What do folks think? Or is this just too difficult to implement? Regards, Dan