3 ms·
I always found the excessive usage of linked lists in lisp style languages to be rather odd. It's about the worst possible data structure for performance unless
by etaioinshrdlu 7y ago
I always found the excessive usage of linked lists in lisp style languages to be rather odd. It's about the worst possible data structure for performance unless you have a sufficiently smart complier... I think it's used for the beautiful simplicity of the language and not because it's actually a good way to compute things.
- e12e 7y agoI think it's partly due to many university lisp courses focusing on the symbolic end of lisp/programming languages - rather than on the performance side of computing theory. For common lisp, for example, it's probably fair to say that an over use of lists is "wrong" in the general case (ie, if your problem is data driven, which would probably be the case in most applications/utilities). Now, if all you're doing is improving the language/honing a DSL - the you'll probably be using lists a lot, as that is what constitutes the abstract syntax tree you're manipulating. See this for a brief discussion on collections in common lisp: http://gigamonkeys.com/book/collections.html http://gigamonkeys.com/book/collections.html