From: gabriele renzi Date: 2005-06-01T02:40:22+09:00 Subject: Re: Intellisense and the psychology of typing Austin Ziegler ha scritto: >> >>Type Inferencing is still almost impossible for far to many >>situations and this will not change because it is fundamental >>problem. > > > Mmm. I'm not sure that I agree. Part of what I'm thinking here has > to do with what Microsoft has done with the .NET platform and Java > has done with Hotspot compiling. Programs are shipped as MSIL. There > is then an initial compile phase of the MSIL to processor-specific > *optimized* instructions. An implementation of Ruby 2.0 could do > something similar, where long-running programs, or programs that are > run often, have cached compiled versions of code that are based on > type inferencing. Sorry, but If I recall correctly MSIL brings explicit type informations, so that is not the same thing. The runtime inference may happen, at least in HotSpot, when you are doing stuff like using boxed structures and the JIT can transform them in a native array once it figures they will hold integers. But some informations can't be inferred that easily. Think for example of the information about an object representing a 32bit/nativesize integer. We will always pay the penalty due to the need to consider that it could, at any moment, become a Bignum, even if there is a guarantee that this will never happen. (not that I care too much about performance, but I still think optional typing is great for documentation)