3 ms·
Amongst the set of opinions (I like Lisp-2s), this is a common misconception: > Nitpick: Multiple return values are unnecessary if you have tuples Alright, it
by vindarel 3y ago
Amongst the set of opinions (I like Lisp-2s), this is a common misconception:
> Nitpick: Multiple return values are unnecessary if you have tuples
Alright, it doesn't say they are the same (because they are not, despite what you can read on the internetz). If you use tuples and you use unpacking on the caller site, every time you add an element to the returned tuple, you are doom to refactoring all the caller sites. Not the case with Lisp's multiple return values[0]. If you don't use unpacking/destructuring, you must access the returned values with a list index, which is errr not the best. But, if you write your first iteration without returning a tuple, and later you do, you are doomed to refactoring the callers everywhere. Not so with multiple return values.
> Hooks, hooks everywhere…
ah, really? I didn't see hooks in Common Lisp the language, and very few in CL applications (unlike in Emacs). There are meta-object protocols, but you can trace them, see their hierarchy, etc.
> Legacy stuff … no threads … no unicode … no networking
It speaks of the standard. Every CL implementation has those ;)
> Clojure
a comparison (not at all biased to CL, no no no): https://gist.github.com/vindarel/3484a4bcc944a5be143e74bfae1025e4 https://gist.github.com/vindarel/3484a4bcc944a5be143e74bfae1...
> It takes 7 seconds to start up a repl on a core i5 laptop with an SSD. WTF is it DOING, anyway? SBCL takes half a second. Stupid JVM.
I should try Clojure more, but this… O_o
---
For new readers, an overview of 2022 :) https://lisp-journey.gitlab.io/blog/these-years-in-common-lisp-2022-in-review/ https://lisp-journey.gitlab.io/blog/these-years-in-common-li...
---
[0]: https://lispcookbook.github.io/cl-cookbook/functions.html#multiple-return-values-values-multiple-value-bind-and-nth-value https://lispcookbook.github.io/cl-cookbook/functions.html#mu...