Hi --

On Wed, 1 Dec 2004, gabriele renzi wrote:

> 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.

They would have to be, because is_a? doesn't tell you about the
object's type, just its class/module hierarchy.  

And then, when a typing system becomes complicated enough, with enough
granularity to even begin to hint at the possibilities embodied in
Ruby objects, it will start to converge on what was there all along
anyway -- dynamism, uncertainty, change -- and will be superfluous :-)


David

-- 
David A. Black
dblack / wobblini.net