3 ms·
This is like going back to y2k and saying 'well if you want double-slash comments you should use the version of c that already has it, namely c++98, and it was
by GFK_of_xmaspast 11y ago
This is like going back to y2k and saying 'well if you want double-slash comments you should use the version of c that already has it, namely c++98, and it was a mistake to add it to c'
- kazinator 11y agoThe only way you can use double slash comments without a C version that already has them is to preprocess your code with some text filter (thereby creating your own dialect which has them). In the 1990's, dialects of C that had // comments were C++, various dialects accepted by C compilers having // comments as a nonconforming extension over C90, and C compilers supporting draft ISO C features. Changing dialects just for the sake of comments is silly; the right choice will usually be "don't use those comments". In C programming, I still don't use // comments today, to keep my code strictly compatible with C90 (in my opinion, the best C dialect to date). I have been a C++ developer for many years and of course used // comments; I have nothing against them, and in fact wouldn't design a language syntax that doesn't have a "from here to the end of the line" comment feature. (Text filtering to obtain C features is not unheard of, by the way. The CLISP sources use something called "varbrace": a text processor which provides mixed declarations and statements.)