|
|
|
|
|
by Kessler83
1637 days ago
|
|
This isn't a very good article. First of all, this has to be the most rehashed curiosa topic about Lisp, ever. Secondly, "keeping in touch with tradition" isn't a shallow thing you do for fun---it is both about identity and about the ability to read and reuse code, even though it is decades old. And thirdly, the reason you keep car and cdr isn't only about tradition, but also about the ability to quickly reach into nested lists: (cdaddr '(1 (2 (3 4 (5) (6 7) 8) 9) (10 1 3) 3))
=> (1 3) Without these oldies, you would have to write several combinations of first, second etc. and rest, or some combination of first/rest and nth n list. |
|
If your list structure is so complex that you are using cdaddr or anything like it, you did something wrong. You should use defstruct with human-readable slot names to create more readable and easier to work with code.