Arc Forumnew | comments | leaders | submitlogin
4 points by pau 5915 days ago | link | parent

I don't think it is so easy. The problem is that it is not the contents of 'nil' that you should set to '(), but the symbol itself (which you quote):

  > (define nil '())
  > (eqv? '() 'nil)
  #f


4 points by nlavine 5915 days ago | link

You're right, this wouldn't work with the current ac.scm. However, if we stop treating the symbol 'nil specially and just let it be a normal variable lookup, then I think everything will work.

The only hard bit, actually, will be making it output things using 'nil instead of '(), but making a fix like that, that's isolated in one small part of the program, seems like a small price to pay for making the main arc compiler sleeker and faster (oh, and the generated code, too).

-----