3 ms·
I don't have a source, but I have read that the reason this wasn't originally introduced into C++ was because they couldn't agree on what the syntax would be. S
by suby 2y ago
I don't have a source, but I have read that the reason this wasn't originally introduced into C++ was because they couldn't agree on what the syntax would be. So much pain because the committee is dysfunctional, it took a decade plus to introduce something that everyone from the start wanted and understood would improve things. Par for the course with C++.
- rerdavies 2y agoAt least it's progress over the first decade of C++'s life where NOTHING happened.
- spacechild1 2y ago> I don't have a source, but I have read that the reason this wasn't originally introduced into C++ was because they couldn't agree on what the syntax would be I can totally imagine that. That's double ironic because the syntax is pretty obvious (which I find pretty surprising for a new C++ feature :) But yeah, it's amazing that we only get this 15 years(!) after the introduction of variadic templates. I can totally see why some languages would decide against ISO standardization.
- mkoubaa 2y agoSuppose c++ is around for 100 more years (i'll take the over). Sacrificing a couple decades in order to get the syntax just right is worth it. Just look at... Javascript.
- int_19h 2y agoYeah, but then look at C++ - does the syntax really look like it's "just right" to you? Modern JS features actually tend to have cleaner syntax, generally speaking.
- mkoubaa 2y agoYou make a great point. It was a good intention that led to a bad outcome. Many such cases
- wakawaka28 2y agoModern JS or any JS is such a different language with not even a tenth of the features that C++ has, it's ridiculous to compare them. It's no wonder it looks "cleaner" -- it just isn't doing anything like what C++ does.
- int_19h 2y agoWe're talking about syntax, not semantics, so I don't see how it matters.
- wakawaka28 2y agoYou can't express more semantics without more syntax. So the "clean" JS is not burdened by the extra semantics that C++ must account for.
- suby 2y agoI'm not sure that this is true. Let's take a look at generics. In C++, we use angled brackets like myFunction<SomeType>(); This could however be done without introducing angled brackets. myFunction(myFirstClassType); which is what more and more languages nowadays do like Zig.