5 ms·
That’s probably the first codebase I have seen in years where someone picked .c++ as file extension. (In my opinion objectively the worst possible choice becau
by the_mitsuhiko 4y ago
That’s probably the first codebase I have seen in years where someone picked .c++ as file extension.
(In my opinion objectively the worst possible choice because + requires URL encoding ;))
- ceejayoz 4y agoOh, there's worse; you can use emoji in filenames.
- deleted 4y ago[deleted]
- staticassertion 4y agoAnything other than null and `\` are valid on linux iirc
- yencabulator 4y agoYou mean slash, not backslash.
- kentonv 4y agoHaha, I started doing this with Cap'n Proto 10 years ago. :) I periodically get crap for it but so far it hasn't really broken anything. The biggest annoyance is exactly what you point out -- the GitHub URLs look ugly because they %-encode the plus signs. Though it turns out you can manually un-encode them and it works fine.
- teddyh 4y agoIt breaks Make, which does not have a default rule for “*.c++” files, but does have rules both for “*.cpp” files and the older naming custom of “*.C” files.
- jchw 4y agoIn modern GNU make it is generally advised to disable default rules anyways. I know some people try to do portable Make, but I am pretty over that idea myself, so if I do use Make, I'm using GNU extensions and GNUmakefile.
- teddyh 4y agoGNU Make does not have a rule for “*.c++” files, either. Do you have a reference to the advice to disable default rules? It sounds counterproductive to me.
- jchw 4y agoThere's lots of different opinions on how to use Make, but here's one. https://tech.davis-hansson.com/p/make/ https://tech.davis-hansson.com/p/make/
- teddyh 4y agoNot very well recieved here on HN a month ago: https://news.ycombinator.com/item?id=32541016 https://news.ycombinator.com/item?id=32541016
- jchw 4y agoThat's a sign that it's good :) Jokes aside though, the only major complaint people have is about .RECIPEPREFIX, which I also don't follow. I didn't read too many comments, but the top voted comments do not appear to take issue with the advice to disable built-in rules. I'd be surprised, since it is far from the first time I've heard that advice, and it never seemed very controversial.
- Thaxll 4y agoWhy would you use .c++ instead of the standard .cpp?
- kentonv 4y agoI got tired of arguing about .cpp vs. .cc vs. .cxx vs. .C. So I used the actual name of the language, and it worked fine. :)
- breakingcups 4y agohttps://xkcd.com/927/ https://xkcd.com/927/
- j16sdiz 4y agoC++ can be .C, .cc, .cxx, or.c++
- Maksadbek 4y agoHow about .cpp ?
- andrewnyr 4y agopeople on this website will complain about the stupidest shit