Comment by andy_ppp
4 months ago
Absolutely terrible. You should spell everything in American English when programming as like it or not the standard in every codebase and programming language going to be this. I am British but coding is not language, and trying to be clever like this is incredibly counterproductive especially in a diverse team. If you want British English to be used why shouldn’t the German on your team be able to use their language for example.
If everyone was just aiming for consistency we would be better off than following developer whims. We should aim to get over our personal preferences and try to be consistent and that means not having an ego about American vs British English.
I'm english, my team is english. We use english spelling throughout.
I'm not switching to american spelling to appease americans who aren't reading my code, in the same way as I'm not programming in french either
So you’d advocate that codebases should be written in the locale of the people writing them? What about open source projects, should they be dictated by the first language of the creator in most cases?
You presumably can’t use British English for the standard library calls so now you have a mixture of languages which to me is pointless and more about the ego of the people writing things. I’m just in favour of consistency which unfortunately you cannot achieve unless you’re wrapping americanised standard library calls with true English equivalents.
If you were coming to a codebase that defined American English as the standard I’m certain you wouldn’t change it. Why then when the underlying language makes that choice for you do you feel good about ignoring that?
"So you’d advocate that codebases should be written in the locale of the people writing them?"
That's unavoidable, to some degree. You can be a programmer who doesn't speak English particularly well. You can write code about a domain that lacks English terms (e.g. you're writing code for a government in Norway — there will be words in your code that lack English equivalents).
Why should a team in China spell out everything in English if very few (if any) English speakers will ever see that code, and if a lot of the people on the team don't speak English well? Just because the language has keywords like "if" or "function"?
Why would you assume that the open source project in question would be written in US english?
Hell, why assume that the project even be written in english at all? There's more non-english speakers in the world than english speakers
2 replies →
The belief that only the US'ian way of doing things is correct is curiously prevalent on the other side of the pond to a level that borders on arrogance.
1 reply →
TBH most programming languages' alleged "English" is their own weird dialect anyway. Take Ruby's "include?" (should be includes?, and yes I have read the rationale), for example, or the eternal weirdness that is C++ ("deque" ain't no country I've ever heard of). If you're going to fixate on doing the same as the stdlib then you're just laying down rakes in your own path.
> So you’d advocate that codebases should be written in the locale of the people writing them? What about open source projects, should they be dictated by the first language of the creator in most cases?
Yes. I'm the one writing the code and I can use whatever bloody spelling I damn well prefer. If someone else takes over then they're writing the code and they can use whatever spelling they want.
Trying to enforce some particular detail like spelling or whatnot for all of "open source" is just eyerolling. Use what you prefer and leave the rest alone. It's that simple.
Not every codebase. OpenStreetMap uses British English, for example.
Why not both? https://dplyr.tidyverse.org/reference/summarise.html#:~:text...
HN. Never change!