3 ms·
The number of times I've mentioned common lisp and gotten "Oh yeah, that's the language with no loops, just recursion, right?" does sadden me a bit. To clear i
by aidenn0 10y ago
The number of times I've mentioned common lisp and gotten "Oh yeah, that's the language with no loops, just recursion, right?" does sadden me a bit.
To clear it up for anyone reading this:
Scheme has tail-call elimination as a requirement of the language; common lisp does not, and even includes an (overly?) sophisticated DSL for iteration in the standard library.
Also 95% of what you learned about lisp in your "Survey of programing languages" course was wrong.
- taeric 10y agoThe loop macro may be described as overly sophisticated. However, I can't help but get a chuckle with how much all of the new "stream" based mechanisms in java[1] mimic it. Ironically, with what appears to be more parens. [1] https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html https://docs.oracle.com/javase/8/docs/api/java/util/stream/C...
- aidenn0 10y agopython's list comprehensions and generator expressions can get pretty complex too.
- taeric 10y agoTo be fair, the LOOP facilities are ridiculously complex. Similarly so are the FORMAT facilities. I regret not knowing more about them as a younger programmer. Most of the "power" of lisp is always shown in the ability to compose programs out of forms. It is amazing how much code you can avoid writing by just using either loop or format. Or both.