Arc Forumnew | comments | leaders | submitlogin
1 point by Pauan 4900 days ago | link | parent

I think this should be configurable in ar, with the default being to follow Arc/3.1, but still allow the programmer to make nil different from 'nil.

Hey awwx, how hard would it be to make this change in ar right now? From what I can see, "nil" is just a global variable bound to the symbol 'nil. So, what if I did this...?

  (ail-code (racket-set! nil (uniq)))
It seems to work okay in the couple tests I did, but I wonder if it would break anything...


1 point by Pauan 4899 days ago | link

Hm... I just realized ar allows for rebinding nil and t! So you can just do this:

  (= nil (uniq))
Neat.

-----

1 point by Pauan 4899 days ago | link

By the way, if you ever decide to rebind nil, and it breaks stuff, you can fix things by doing this:

  (assign nil 'nil)
You need to use `assign` rather than `=` because `=` breaks if nil isn't 'nil.

-----