On Fri, Apr 02, 2004 at 04:46:40PM +0900, Jean-Hugues ROBERT wrote:
> Example (with type inferencing)
> def xxx?()
>   hint
>     Bool xxx # Tell the compiler that returned value is always a bool
>   end
>   some_other_thing
> end
> Here, an optimizer can generate faster code, where ever xxx? is
> called, because it knows that the result will always be a Bool.

If you have a real constraint propagation engine, the hint is unneeded.
I'm not sure it makes sense to add something w/ potential for abuse and
which doesn't seem to solve any problem now, for the sake of a future
optimization that could be done differently anyway.

> I believe that user provided "hints" and "type inferencing" is a way
> for scripting languages to become general purpose languages that
> can match the speed of statically typed languages.
> 
> Kind of "constraintable dynamic typing". A way to end
> the "static typing" versus "dynamic typing" war and get the
> benefits of both.

Yes, type inference and partial evaluation are cool; isn't it a pity
that we have yet to start working on the the stuff lisp (or more
recently self) implementors solved so long ago? :-|

-- 
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Yes I have a Machintosh, please don't scream at me.
	-- Larry Blumette on linux-kernel