> Not really. It's true if you compare, like f(x) to (f x), but in general Lisp really does have more.
In general I think this is true, but an important caveat that your post brings up is that sometimes it also has to do with how we translate one language to another.
Consider treating a 3-tuple as a list, and assume you have the primitive functions zip, square, sum, and sub (inverse of summing a list). Then the idea of the distance between two points reduces to:
Of course there really are more parentheses here than in the C snippet you wrote, and it's arguably harder to understand, especially if you're unfamiliar with functional programming; it could be slower, too, and careless use of the zip function truncates at the shortest array. (I'm sure there are other objections I haven't anticipated.)
At the same time, if you want to generalize the C function to arbitrary vectors, you'll have to do a little more work with passing arrays, checking bounds, adding a loop. The Lisp function, by contrast, requires no such effort, and once the concept is understood requires little further explanation.
Even so, the point is that line-for-line translations may not always capture idiomatic usage of the language, which may in turn make it look or feel worse than it really is.
In general I think this is true, but an important caveat that your post brings up is that sometimes it also has to do with how we translate one language to another.
Consider treating a 3-tuple as a list, and assume you have the primitive functions zip, square, sum, and sub (inverse of summing a list). Then the idea of the distance between two points reduces to:
Of course there really are more parentheses here than in the C snippet you wrote, and it's arguably harder to understand, especially if you're unfamiliar with functional programming; it could be slower, too, and careless use of the zip function truncates at the shortest array. (I'm sure there are other objections I haven't anticipated.)At the same time, if you want to generalize the C function to arbitrary vectors, you'll have to do a little more work with passing arrays, checking bounds, adding a loop. The Lisp function, by contrast, requires no such effort, and once the concept is understood requires little further explanation.
Even so, the point is that line-for-line translations may not always capture idiomatic usage of the language, which may in turn make it look or feel worse than it really is.