This made me realize that the rules are arbitrary and what matters is if people can understand what you're saying.
This made me realize that the rules are arbitrary and what matters is if people can understand what you're saying.
---
[1] Not using extra space to line up similar parts of similar lines when grouped together, for instance, I find it makes things easier to read and alter afterwards
[2] Some codebases absolutely hate one-line if statements, it must be in a block even if only one statement is inside the conditional and the brackets must each be on their own line. I get that for more complex code it breaks things up visually in a way that is helpful, but stretching out 20..30 characters over four lines, artificially lengthening a function significantly if it happens multiple times…
[3] One FOSS project I once submitted a patch for insisted on absolutely no inline comments – all explanation had to be in the comment block at the head of the function declaration. It almost discouraged commenting, and I like to comment liberally.
What I disagree with sometimes is whether the block needs to start on a new line. For example I would like to do this:
if (foo = bar) { blah(); }
But my former team was against it, and my current team uses a style enforcement tool (which I do agree with in principle), so I don't.Point 1 is fine by me and the team: We embrace "tabs for indentation, spaces for alignment", so that fits into the philosophy.
Point 3, i.e. disallowing inline comments, seems ill-conceived and bad to me.
[1] Actually correctness, which often means security.
[2] Or rather a generalization of what "hygienic macro" means.
I'm happy with that. In fact I usually do that to avoid schoolboy errors when expanding to multiple statements later. It doesn't add much (a few characters, not three lines) and allows for lining up parts (ala my point 1) when there are a couple or more of lines doing very similar (but not so much so they can be usefully reduced to a function/macro).
doohureehliebeeleafþatt?
The first rule of communication is knowing your audience and if one's language can be adapted in simplicity, complexity, lexicon, grammar, content, style, voice, medium &c to be more readily understood, then it's in the speaker's benefit to do so. If GP's teacher could not earnestly understand vulgar English then by all means adapt, but the sense that I'm getting is that they were being obstinate on purpose and those sort of people should live in the communicative bubble of isolation they put themselves in.
By the way, as a European person (speaking multiple European languages, even) living in the US for a decade, you quickly give up on taking language "rules" too seriously or else you go insane.
What English (partly US English, partly "English in general") does to foreign words is... interesting. Also interesting is that unlike any other language I speak, reading a word in English is often not sufficient to know how it's pronounced. Yes, French's orthography for example seems enormously complex ("Bordeaux"?) compared to e.g. German or Italian, but it's still consistent.
If I had to guess, I'd think that's too a large part because of things like the Great Vowel Shift, and loan words from multiple languages. (Not a linguist though, so eh, just stupid guesses.)
The French don't seem to agree.
I disagree. Kind of. Like all languages, English is a tool. The more complicated that tool is, the harder it is to learn/use, the less effective it is. YAML and HTML are easy examples of how the complexity of a language can hurt its utility. There's something to be said for maintaining a formal spec that guards against changes that would introduce unnecessary complexity.
However... a spec like that doesn't exist for English - at least not one that most of its users agree upon - and being able to understand what people are trying to communicate is absolutely the most important feature of any language. Therefor, I consider it a faux pas to strictly enforce arbitrary rules like your professor did. Frankly, it sounds like he was just using his position to take out his frustration on others.
Not that you can learn anything unless it sticks to a certain set of rules.