Arc Forumnew | comments | leaders | submitlogin
3 points by zck 5545 days ago | link | parent

>...I still don't see why [(cons 'a 'b)] can't be type list.... list is more intuitive.

Traditionally, there's a distinction -- if only in discussion, and not code -- made between nil-terminated conses and a cons with another terminator. If and only if a cons is nil-terminated, it's a list. Otherwise, it's simply a cons.

Making the distinction would be difficult. Right now, type just has to call pair? to check whether it's a 'cons. To have both list and cons types would require iterating down until you hit the end of the list every time type is called. I'm not sure having both types is useful. It might make things more complicated.



1 point by thaddeus 5545 days ago | link

That makes sense. I just wonder if were living with the distinction because of the implementation or if the implementation could change so that distinction could go away?

Not to say I know how. :) T.

-----