[plt-scheme] Native code generation and immutable pairs

From: Greg Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Fri Mar 10 20:54:57 EST 2006

--- Jim Blandy <jimb at red-bean.com> wrote:
> My goal here is to find some way to allow the compiler to eliminate
> run-time typechecks.  

Is it too radical to suggest that optional type declarations be
introduced into Scheme (a la ML)? Assuming all the attendant problems
could be solved, you  might be able to include something like

(signature my_function (number number) (immutable-list (any)))

to tell the compiler that my_function takes two numbers and retutrns an
immutable list. I'm not sure if its good enough to introduce a "type"
any, allowing any x any to subsume a x b, a x a, etc. I don't think
products would be a problem, but what about recursive types? How does
mutability work with a type system?

Gregory Woodhouse  <gregory.woodhouse at sbcglobal.net>

"It is foolish to answer a question that
you do not understand."
--G. Polya ("How to Solve It")

Posted on the users mailing list.