Earlier quoted context omitted.
Nice "No true Scotsman" logic there. Sure, if you see multiple question marks as an indicator of unprofessionalism, then by definition, no professional would use that. At the same time, your definition of professional is not one that is useful in any other context. In code written by people whose job it is, in part, to write code, i.e. what I would call professionals, multiple question marks do sometimes occur.
Did I really produce a Scotsman there? I would break it down like this: * Professionals want to appear professional to the people who pay them. * People who read the code can have an influence on the people who select which professional gets hired. (At least negatively if they find examples of poor practices.) * Professionals therefore avoid any behavior that would be interpreted as unprofessional. * Multiple questio…
C, what the fuck??!
21–30 of 38 posts
Re: C, what the fuck??!
#22This is about that ancient EBCDIC (IBM's ASCII "competitor") specific hack called trigraphs, which in modern compilers are opt-in anyhow: "To understand this, I have to admit one thing: I have to pass -trigraphs to a modern version of gcc before this actually works. " C++17 actually removed support for these.
Re: C, what the fuck??!
#23Earlier quoted context omitted.
The chance of this accidentally happening is almost 0. This is what `gcc` does: `test.c:6:31: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]`
So it would take some clueless developer who adds the compiler flags to get rid of the warnings during the yearly code cleanup season. Therefore the probability of this happening by accident is 0 but the probability of this happening by incompetence (after the trigraph already slipped in undetected) hovers around 82%.
Re: C, what the fuck??!
#24Re: C, what the fuck??!
#25Earlier quoted context omitted.
Nice "No true Scotsman" logic there. Sure, if you see multiple question marks as an indicator of unprofessionalism, then by definition, no professional would use that. At the same time, your definition of professional is not one that is useful in any other context. In code written by people whose job it is, in part, to write code, i.e. what I would call professionals, multiple question marks do sometimes occur.
Did I really produce a Scotsman there? I would break it down like this: * Professionals want to appear professional to the people who pay them. * People who read the code can have an influence on the people who select which professional gets hired. (At least negatively if they find examples of poor practices.) * Professionals therefore avoid any behavior that would be interpreted as unprofessional. * Multiple questio…
Seems like a really weak assumption to me. Seen enough swear words etc in actual code bases, "???" in bug trackers, ... to think people would worry about the number of "?" they use in comments.
Re: C, what the fuck??!
#26Re: C, what the fuck??!
#27Seriously, at this point C should be considered dangerous and should be actively discouraged. I would even go so far as to legislate it. We can't have this sort of thing in 2019.
They only existed because really old terminals sometimes didn't have various punctuation characters used by C so they needed the ugly workaround so people trapped on those terminals wouldn't be left out in the cold.
Re: C, what the fuck??!
#28Seriously, at this point C should be considered dangerous and should be actively discouraged. I would even go so far as to legislate it. We can't have this sort of thing in 2019.
Re: C, what the fuck??!
#29This is about that ancient EBCDIC (IBM's ASCII "competitor") specific hack called trigraphs, which in modern compilers are opt-in anyhow: "To understand this, I have to admit one thing: I have to pass -trigraphs to a modern version of gcc before this actually works. " C++17 actually removed support for these.
Trigraphs were not specific to EBCDIC: they were also a bad accommodation for the ISO 646 ASCII variants that supported European languages, which used characters {\|} etc. for letters. This is why the newer better header with alternate spellings for restricted character sets is called https://en.wikipedia.org/wiki/ISO/IEC_646
Outside of silly games like IOCCC, did anybody actually use trigraphs? I find it really hard to believe that anybody tolerated trigraphs for serious C programming. Was there an obscure European government agency that actually wrote code with trigraphs?