3 ms·
For an alternative point of view, I write lisp for my day job and would not approve any code that just shoved a bunch of unrelated data in a list. Thinking abou
by monadic2 6y ago
For an alternative point of view, I write lisp for my day job and would not approve any code that just shoved a bunch of unrelated data in a list. Thinking about the destructuring code, especially if you don’t have access to pattern matching, is enough to give me a headache. You know that‘s not going to be documented, and if it is, people won’t be able to find the documentation. Just use records; every lisp has records, and it’s the point of records, and it’s not any less “elegant” or “beautiful” or “lispy” or whatever to have named fields and nice printing and accessors for free.
The one exception I can think of is procedures with variadic arguments.
- kazinator 6y agoWhy don't you have access to pattern matching in your Lisp day job? (There is at least a coffee machine, health benefits, and a halfway ergonomic chair to sit on, hopefully.)
- monadic2 6y ago> Why don't you have access to pattern matching in your Lisp day job? The lisp I use (scheme) does not have pattern-matching built-in and nobody has made a good enough case to add it as a special form.
- oalae5niMiel7qu 6y ago> scheme There's your problem. Here's a nickel (toss). Get yourself a real Lisp.