3 ms·
Earlier this year, I decided to learn Lisp for kicks and Practical Common Lisp was the book that resonated with me the most. The whole experience didn’t result
by runjake 5y ago
Earlier this year, I decided to learn Lisp for kicks and Practical Common Lisp was the book that resonated with me the most.
The whole experience didn’t result in me switching or even continuing to use Lisp, but what it did is show me some of the origins of the features in the languages I already use.
My Python and JavaScript code is definitely more “Lispy” now, if that makes sense.
Trivia: In my studies, I was surprised to learn that recent versions of Excel support lambda functions in formulae.
https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/ https://www.microsoft.com/en-us/research/blog/lambda-the-ult...
- zelphirkalt 5y agoPython will probably forever remain stunted for its bad lambda syntax, allowing only 1 statement in it. It is not a deal breaker, but annoying to make named things out of anonymous things. Then there is the issue of no TCO. At least JS has that in the spec, even though almost no one implemented it.
- HerrMonnezza 5y agoThe Python package lambdex [1] provides a way to write multi-line anonymous functions in Python, with a syntax that's close enough to the "normal" Python. [1]: https://pythonrepo.com/repo/hsfzxjy-lambdex https://pythonrepo.com/repo/hsfzxjy-lambdex
- zelphirkalt 5y agoInteresting. This looks weird though, because now there is `def_` (not `def`) and `lambda`, instead of only needing `lambda` or only `def`. I am guessing you would also need to `def_` from somewhere. And you need to change a lot of parens inside to brackets, making it even more unnatural in Python sense.