2 ms·
Well, not just some library. (The 'standard library' should be seen as part of the language.)
by Koshkin 8y ago
Well, not just some library. (The 'standard library' should be seen as part of the language.)
- stochastic_monk 8y agoTrue, but there is a huge difference between a standard library feature and a keyword.
- Koshkin 8y agoNot really... Not in the case of the standard library anyway.
- stochastic_monk 8y agoA keyword is a more core part of the language than the standard library. I could re-implement my own vector. I cannot add my own keyword.
- Koshkin 8y agoNo, you cannot/wouldn't reimplement std::vector (not in the sense you are implying). Compiler writers often extend the language with new keywords.
- stochastic_monk 8y agoCan you elaborate on the last point? Do you mean things like macros they use, e.g., concepts lite, or __builtin* functions? I still feel like a standard container is less fundamental than keywords, but I value your perspective.
- Koshkin 8y agoYes, built-ins, intrinsics, and extensions. My original point was simply that std::vector, say, is just as good a "keyword" as any - perhaps, not because you cannot redefine it but because you wouldn't, and if you didn't like what it does, you'd use/implement something else.