There is something I always wondered ... Since in most cases Lisp prefers prefixed notations, why are cons-cells written in the form (A . B), which is an infix-notation as far as I see. Of course, when parsing a list, and creating its data structure, this notation does not really make the situation more complicated, since you could just read the next symbol, and then - if its not the dot - push a new cons cell on the cdr of the current one and set its car to the symbol, and if the list ends set the cdr to nil, if its a dot, push it, and set the cdr to the value given after the dot. And I see that this notation is handy when specifying lists which do not end in nil, like in scheme's define-statements for arbitrary many additional arguments.
I dont consider this a bad thing, I just always wondered why we have an infix notation here, while avoiding it on vitally every other place. Has it some historical reasons?
I dont consider this a bad thing, I just always wondered why we have an infix notation here, while avoiding it on vitally every other place. Has it some historical reasons?
Sorry for my bad english.
Visit my blog http://blog.uxul.de/
Visit my blog http://blog.uxul.de/