evanrmurphy / SweetScript

A lispy language that compiles into JavaScript, strongly influenced by Arc.
https://github.com/evanrmurphy/SweetScript
14 stars 4 forks source link

Support nil #12

Open evanrmurphy opened 13 years ago

evanrmurphy commented 13 years ago

nil as a special convenience symbol. Consder PicoLisp's NIL as a model:

NIL is a special symbol which exists exactly once in the whole system. It is used

  • as an end-of-list marker
  • to represent the empty list
  • to represent the boolean value "false"
  • to represent the absolute minimum
  • to represent a string of length zero
  • to represent the value "Not a Number"
  • as the root of all class hierarchies

Would be tricky to implement here without some changes, since the cons cell isn't a fundamental type.