3 ms·
You contradict yourself: > backward compatibility means your code written in C++98, still works if compiled in C++11 > writing valid C90 (without using // com
by chx 10y ago
You contradict yourself:
> backward compatibility means your code written in C++98, still works if compiled in C++11
> writing valid C90 (without using // comments), would compile file in C90 and above.
Aye. There's the rub: backwards compatibility is broken by introducing // as int i = 2 //* */2 which is perfectly valid code in C90 evaluates to 1 while 2 in later version. When releasing later versions you are always breaking someones insane code. It's a matter of compromises between breaking 0.00000000001% of the codebase and progress. The number of zeroes in that percentage is of course debatable, see http://www.cl.cam.ac.uk/~pes20/cerberus/notes50-survey-discussion.html http://www.cl.cam.ac.uk/~pes20/cerberus/notes50-survey-discu... where a number of "Do you know of real code that relies on it?" are answered by ~20% of yes and ~20% of no, that would be crazy. So it is entirely possible the standards committee believes a construct is not used, that'd be crazy but it actually is used.
- ben0x539 10y agono version of C++ ever added new comment syntax that a previous version of C++ didnt have, tho
- Someone 10y agoNitpick: as far as I can tell that's _almost_ correct. http://www.softwarepreservation.org/projects/c_plus_plus/index.html#release_e http://www.softwarepreservation.org/projects/c_plus_plus/ind... leads me to http://www.softwarepreservation.org/projects/c_plus_plus/cfront/release_e/doc/ReferenceManual.pdf http://www.softwarepreservation.org/projects/c_plus_plus/cfr..., which shows that the first external C++ release didn't have // comments. The first commercial release had, though (http://www.softwarepreservation.org/projects/c_plus_plus/cfront/release_1.0/doc/ReleaseNotes-Lifeboat.pdf http://www.softwarepreservation.org/projects/c_plus_plus/cfr...)
- ben0x539 10y agoDarn. :P I was only thinking of the standardized ones, but you're correct, of course!