Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't immediately see why he is not just using NULL for nil but Interim is nonetheless more conventional than it may seem. It does use nil for '() (see [1]) and it evaluates (car nil) to nil and (cdr nil) to nil just like Common Lisp does. The last element of a list may be nil because list elements always appear in car positions whereas it is always the cdr position that one checks to identify the end of the list. If you walk a list without checking for nil, then you will appear to find a list that ends with an unending sequence of nil elements (as is the tradition!). For example, try (third nil) in Common Lisp; you will see a result of nil and no error.

[1] https://github.com/mntmn/interim/blob/master/sledge/alloc.c#...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: