Re:Syntax Matters...?
by ajross on Monday April 16, 2012 @11:55AM
(#3847868)
But isn't that abuse of the word "concept"? The same logic would argue that C has no concept of a string, or that lisp has no concept of an object (despite lots of text handling and OO code being written in both languages). Not every "closure" works the same, even between languages that support things called "closures" and use them in roughtly the same way. Anonymous Java classes are clearly a related concept, and in fact as the grandparent points out there's a straightforward mapping between them.
[ Parent
| on HN ]
I would argue that C has no concept of a string: there is no direct support in C (or C++, for that matter) for concepts related to strings. They are just arrays that happen to contain characters. All of the strigyness of those arrays exists solely in the mind of the programmer. C itself does not help you any. That is, I think, the hallmark of a language level abstraction: does the language allow you to think of the entity only as its abstraction, or do you need to handle that yourself? This fact is also, I think, a major reason why there are so many string-related bugs in C code.
Having never used Common Lisp, I can't say if that's also accurate for your other example.
Edit: ARGH. I forgot string literals in C. So C clearly does have the concept of strings. The problem is that's the only support in the language for that concept. Aside from being able to define string literals, C does not help you with strings at all.
Fair enough. Then I suspect we'll just have to agree to disagree here. To me, that's a near-meaningless semantic distinction. Language concepts are squishier in my mind.
I'm not sure we can make a distinction here; since it's possible to use any Turing-complete language to augment itself (if necessary, in the worst case, by writing a new virtual machine for itself in itself), every language, technically, includes every concept. We have to draw the line somewhere, don't we? :)