From: gabriele renzi Date: 2004-12-01T07:37:49+09:00 Subject: Re: Optional static typing (or, What can Ruby 2.0 borrow from Boo?) Daniel Berger ha scritto: > Hi all, > > I was just looking at http://boo.codehaus.org/BooManifesto.pdf. One > thing I really kinda like is the optional static typing. IIUC in boo is the contrary. It has optional duck typing, but it is strongly typed (with type inference) > 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 I think that teorically optimization can be done from a jit even withouth type hinting. Psycho for python and various SmallTalk do this. But optional typing is interesting for documentation and early failing purposes. Matz is thinking about this, so feel free to write an rcr ;) But In case we had optional typing I'd prefer to see types as full predicates, instead of simple is_a? checks.