News for hackers. Stuff that matters.
Re:Modern C++: 7 Ways to Fake It Until You Have It by stochastic_monk on Tuesday September 04, 2018 @12:28PM (#17910239)
Yes, because vector is a library, not part of the core language itself.
Re:Modern C++: 7 Ways to Fake It Until You Have It by Koshkin on Tuesday September 04, 2018 @01:25PM (#17910874)
Well, not just some library. (The 'standard library' should be seen as part of the language.)
Re:Modern C++: 7 Ways to Fake It Until You Have It by stochastic_monk on Tuesday September 04, 2018 @01:41PM (#17911065)
True, but there is a huge difference between a standard library feature and a keyword.
Re:Modern C++: 7 Ways to Fake It Until You Have It by Koshkin on Tuesday September 04, 2018 @06:10PM (#17913287)
Not really... Not in the case of the standard library anyway.
Re:Modern C++: 7 Ways to Fake It Until You Have It by stochastic_monk on Tuesday September 04, 2018 @07:56PM (#17913932)
A 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.
Re:Modern C++: 7 Ways to Fake It Until You Have It by Koshkin on Wednesday September 05, 2018 @09:27AM (#17917692)
No, you cannot/wouldn't reimplement std::vector (not in the sense you are implying).

Compiler writers often extend the language with new keywords.

Re:Modern C++: 7 Ways to Fake It Until You Have It by stochastic_monk on Friday September 07, 2018 @08:01AM (#17933567)
Can 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.

Re:Modern C++: 7 Ways to Fake It Until You Have It by Koshkin on Friday September 07, 2018 @03:29PM (#17936988)
Yes, 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.