[bitc-dev] Re: BitC issues
Jonathan S. Shapiro
shap at eros-os.org
Mon Dec 20 18:12:35 EST 2004
On Mon, 2004-12-20 at 17:01 -0500, Swaroop Sridhar wrote:
> Jonathan S. Shapiro wrote:
> > Definitely not! The top level binding should be an uncompleted LET. It
> > is very important not to allow identifiers to be redefined. It will
> > bugger separate compilation all to hell if we allow this.
> I agree. But we may want to have some kind of 'undefine' or rather
> 'redefine', along with the usual define. This will enable the programmer
> to write:
> use matlib.bc (* BitC library containing definitions for +, -, *, ..
> etc *)
> redefine + (lambda x (lambda y x*y+2))
We absolutely must not permit such a redefine operation. Note that we do
not presently have such a 'use' operation, and this is intentional.
> Otherwise, since we have a single name-space, in order to redefine +
> the user has to:
> -- redefine + in a let binding everywhere, or
> -- write his own matlib.ad, which is matlib.bc with the
> new definition of +
> Is there any other way out?
I have no intention of permitting the redefinition of an existing
procedure name in this fashion. We may at some future time want to
consider overloading, but not anytime soon.
> 2) Is there any reason to define lambda as
> lambda => (lambda pattern expr+)
> rather than
> lambda => (lambda pattern expr), and then use begin .. end?
> The same holds for let, let* and letrec.
Yes. Compatibility with existing Scheme behavior and custom.
> 3) What is the syntax for comments?
Anything following a semicolon is a comment.
Jonathan S. Shapiro <shap at eros-os.org>
More information about the bitc-dev