[bitc-dev] Change to type declarations

Jonathan S. Shapiro shap at eros-os.org
Sun Oct 17 18:43:58 EDT 2004


I've been reading some papers, and I want to revise the way we are
declaring types.

In procedures, eliminate the type declarations in the formal parameters
in favor of DECLARE forms:

(defun fib (x)
  (declare (type int32 x))
  (+ (- x 1) (- x 2)))

and in expression context, THE forms:

   (let ((a (the int32 3))) ..body..)

My intention is that these should always be permissible, but they should
be largely optional, and that we will go to a type inferencing engine.

HOWEVER, the type inference engine will operate by inserting these forms
so that the types of all variables can be explicitly determined by the
phase that builds the datatype.

The motivator for this is that in level-1 BitC we want to introduce
things like CONS, and to do so we will need parametric polymorphism.


shap



More information about the bitc-dev mailing list