[plt-scheme] The role of proper and improper lists?

From: Bill Wood (william.wood3 at comcast.net)
Date: Fri Jan 25 13:34:58 EST 2008

On Fri, 2008-01-25 at 09:47 -0600, Grant Rettke wrote:
> Based on everyones replies my current take on improper lists is that
> you could indeed construct them if you wanted, by using 'cons'. You
> may do this because you wanted a fixed-size list (for some reason),
> but barring that, there are not general benefits to doing so.
> Perhaps you would use use them to represent trees (?), but beyond that
> I am not familiar with other uses. Improper lists are an option
> because we are provided with 'cons; there is nothing more to it than
> that.
> Thoughts?

I rather like having a tuple type (fixed-length heterogeneous sequence
ala SML or Python) distinct from proper lists.  When programming in lisp
or Scheme I sometimes use improper lists for tuples -- the difference in
structure acts as a reminder that the type is conceptually different.

 -- Bill Wood

Posted on the users mailing list.