2 ms·
> But I'm usually not writing code for most people on the planet. I'm usually writing it for work, or myself. Even in such cases I tend to write code and comme
by kruczek 12y ago
> But I'm usually not writing code for most people on the planet. I'm usually writing it for work, or myself.
Even in such cases I tend to write code and comments in English, which is not my native language. English naming convention just fits better with English keywords and yeah, who knows if I'll really be the only one reading that code..
> Because the writers were probably not fluent in English! The purpose of a comment is to explain something; if you cannot explain it fluently, then the comment is useless.
Well, sorry, but in such case I am tempted to consider writers of such code as amateurs. In this age, if we speak about anything more than the smallest local projects, then English is a de-facto standard language to be used for coding (naming conventions and comments).
If a comment doesn't explain something fluently, then it may still be useful - it may provide hints as to what is going on. But if a comment is in an unknown language, then it is completely useless clutter, a distraction which just makes the code itself harder to read. So yes, I'd rather prefer a writer to use his not-so-fluent English (which actually is quite common in many projects; and this also gives the writer an opportunity to improve his English) rather than write in another language, which most likely won't be understood at all.
> At the end of the day, someone needs to learn two languages; you're saying that it should never be you, but someone writing some code you happened to run across.
He mentioned English is not his native language, so he already learned two languages.