Hi,

On a recent consideration of the design of Scheme, a question comes to my
mind:

Why do we have both list and dotted-list, given that the former is just a
special case (terminated by nil) of the latter? Can we simply live with the
latter? I see it is fairly easy to write common list procedures, like
`length', `map', `append' etc that could handle dotted-list very well, with
the predicate `pair?'. Is there some special consideration for the
'terminating a list by nil' convention? (I see one maybe from the recursive
data structure view, but it does not convince me.) If 'terminating a list by
nil' is considered good, can we live without `dot', having `cons' build a
true list (conforming to the definition of list in recursive data
structure)? In other words, is it a good idea to have everything be a list
or dotted-list?


-- 
DAI Yi
(代 毅)
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to