If you've ever looked at the VAX instruction set, you'll possibly be surprised to see an essentially-Greenspun microcoded CPU (there's definitely list-walking instructions in there and all sorts of BIZARRE things).
One of the few CPUs I know of where "optimize for lowest instruction count" tends towards generating slower and larger code than either "optimize for smallest code size" or "optimize for fastest execution" (also the inly CPU I know of to have had a "optimize for instruction count" compiler, but taht may be by-the-by).
Greenspun's tenth rule is a trap: to admit you follow it, you must evince dangerous lispish tendencies. But to deny you follow it, you must point to all your code and say, "Inquisitors! I defy you to find the tiniest spot of lisp in my unblemished codebase!"
Really, though, "Lisp" in this context means "Lisp at its best." Take a few months off your job, stay away from romance and fun, and just read the Common Lisp manuals and The Art of the Metaobject Protocol, and you too will understand Lisp At Its Best. And you will realize why List At Its Best probably can't be yours.
And if you start hassling other languages for not being Lisp At Its Best... why, is that really Lisp's fault? really?
Lua very intentionally omits 95% of the feature set of Common Lisp, so that you can use it in environments where you only have room for the half of Common Lisp you're using. There are off-the-shelf libraries for a lot of those features, though, so you don't have to use an informally-specified, bug-ridden version.
I grok that, though it's mind-boggling to me that a language with first-class functions wouldn't have either list slicing a la Python or cons/car/cdr. Presumably this is because the built-in listlike object is the associative array (which gives the whole thing an uncomfortably PHP-like feel), but it still leaves me wondering where the tools that fit in my hands so well have gone.
And the whole business of indexing from 1 is just ridiculous. This is computer science, not biology.
Strangely, I never learned Pascal. I would have, if I'd taken the Computer Math II class that my high school offered (Computer Math I, aka "BASIC programming", was a required course for honors students), but the year I planned to take it (junior year), only four students signed up -- and one, my then-boyfriend, moved to Utah just before the school year started, so there weren't enough students to justify paying a teacher for it. I could have tried again my senior year, but I wanted to take both second-year chemistry and second-year physics, so there was no room in my schedule.
Computer Math I was also the course where I kept getting in trouble for finishing the assignments within the first few minutes of class and spending the rest of the hour either playing Wing Commander, exploring the network, or writing BASIC programs that annoyed other people. Halfway through the semester I got pulled aside and asked "okay, since you obviously already know everything on the syllabus, what do you really want to be doing in here?" I said, "I hear
( ... )
Comments 26
Reply
Reply
One of the few CPUs I know of where "optimize for lowest instruction count" tends towards generating slower and larger code than either "optimize for smallest code size" or "optimize for fastest execution" (also the inly CPU I know of to have had a "optimize for instruction count" compiler, but taht may be by-the-by).
Reply
(The comment has been removed)
Really, though, "Lisp" in this context means "Lisp at its best." Take a few months off your job, stay away from romance and fun, and just read the Common Lisp manuals and The Art of the Metaobject Protocol, and you too will understand Lisp At Its Best. And you will realize why List At Its Best probably can't be yours.
And if you start hassling other languages for not being Lisp At Its Best... why, is that really Lisp's fault? really?
Reply
Reply
(The comment has been removed)
Reply
Reply
And the whole business of indexing from 1 is just ridiculous. This is computer science, not biology.
Reply
There's always Pascal, where you can index an array from where ever the heck you want. :)
Reply
Computer Math I was also the course where I kept getting in trouble for finishing the assignments within the first few minutes of class and spending the rest of the hour either playing Wing Commander, exploring the network, or writing BASIC programs that annoyed other people. Halfway through the semester I got pulled aside and asked "okay, since you obviously already know everything on the syllabus, what do you really want to be doing in here?" I said, "I hear ( ... )
Reply
Leave a comment