tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.02k stars 48 forks source link

Allow lists to be empty #141

Closed porky11 closed 7 years ago

porky11 commented 7 years ago

Is useful for writing macros and using them. Currently, I would have to use a special value as list argument (like void for no-argument-functions), or a list-prefix (like (array …) (refines …)) it is more clear, that something is empty / has no arguments, if () is used, and also easier to parse. () could expand to a empty DNode. I don't think, the core forms will have to use (), but my own parsing macros should be able to read (). This way, defining large objects using array-like data types won't need a prefix or empty special value.

tomhrr commented 7 years ago

Thanks, this has been done. There may still be some code that assumes a true value for is-list means that list-node will be set, though.