[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The variables +, -, *, and /



    Received: from SU-AI.ARPA by MIT-MC.ARPA  4 Dec 85 04:32:20 EST
    Received: from MIT-MC.ARPA by SU-AI.ARPA with TCP; 4 Dec 85  01:19:57 PST
    Date: Wed,  4 Dec 85 04:22:30 EST
    From: Tim McNerney <TIM@MIT-MC.ARPA>
    Subject:  The variables +, -, *, and /
    To: common-lisp@SU-AI.ARPA
    Message-ID: <[MIT-MC.ARPA].740954.851204.TIM>

    It seems unfortunate that the variables +, -, *, and / were reserved for use
    by the Top-Level Loop.  This choice of names makes it difficult to build the
    run-time environment for Scheme-like language that compiles into Common Lisp
    and that supports the illusion that there are no separate function and value
    cells.  If these variables had not been reserved, one could

	(DEFCONSTANT + #'+)
	(DEFCONSTANT * #'*)
	etc...

    so that

	((IF SUM? + *) X Y) 

    could be simply compiled into

	(FUNCALL (IF SUM? + *) X Y)

Why not create a package SCHEME that doesn't import any symbols or use
any other package, and do what you like in that package, i.e.,

	(LISP:DEFCONSTANT + #'LISP:+)

and build your own world?  This is not unlike the Symbolics solution to
Common Lisp vs. Zetalisp on the 3600 -- two different worlds rooted at
different packages ("GLOBAL" and "SYMBOLICS-COMMON-LISP").

	-- Richard