Am I the only one geeky enough to be annoyed by the syntax and bad style of this Axe ad that everyone’s reblogging?
Because it’s been 16 months since I’ve programmed in C, I was a little rusty, so I whipped up the test program above to make sure it’s valid. (It is.) I wasn’t sure if the “get.a.girlfriend” part, evaluating to a variable and not a function call, was valid. (It is, but it has no effect. “2;” is a valid C statement that does nothing. I assumed this would at least throw a warning in GCC… nope.)
I’ll ignore the syntax highlighting of the word “this” and assume that, rather than writing invalid code, they were just viewing C code in a C++ editor (from the font and style, probably MS Visual C++). In that case, they’re just guilty of bad style.
Sorry ladies, I’m taken.