Proper or well formed Lists

James Hague jamesh@REDACTED
Thu Dec 14 16:56:12 CET 2000

> The reason is mainly hereditary, the high-level languages we were used
> to when we started developing Erlang were Lisp and Prolog and both these
> languages allow this.  Also the early versions of Erlang were Prolog
> interpreters.  We did have some discussion about this but did really
> feel it important enough to warrant a change.

Usually I see these kinds of lists in Lisp ("dotted lists" in Lisp lingo)
for memory reasons.  (cons A B) takes less space than '(A B) or
(make-some-structure A B).  It's also a poor-man's tuple :)

Would there be a performance benefit if the run-time system knew that the
cdr field of a cons was either [] or a valid pointer?  What about for
C-coded functions like reverse?


More information about the erlang-questions mailing list