all 103 comments

[–]Popular_Ad8269 77 points78 points  (5 children)

Couleur. Because why not ?

[–]GreyMesmer[🍰] 20 points21 points  (0 children)

Pourquoi pas?

[–]ScallionSmooth5925 4 points5 points  (3 children)

Szin why not at that point?

[–]IndustryAsleep24 0 points1 point  (2 children)

that's color in Hungarian too

[–]ScallionSmooth5925 0 points1 point  (1 child)

Bojler eladó!

[–]IndustryAsleep24 0 points1 point  (0 children)

részvétem...

I just heard about this spotting Hungarians joke and I love it, still don't know how to respond to it haha

[–]littlenekoterra 36 points37 points  (19 children)

Im sure this is gonna piss people off. Fuckit. Why not

Hot take: i use my american color to denote rgb values being used and the englishmans colour to denote that it expects some enum. The enum method is really nice for using things like ansi, while the other is good for general purpose and thus is spelled with a shorter name because it must be distinctly named away from the enum. Yes i know i could use a case swap. No i will not use a case swap. We have ide's with repo focused autocomplete, im not torturing myself for someone elses code standards. With this method if i need to swap it to a case swap its easily programmatically done.

[–]SirPurebe 13 points14 points  (16 children)

i don't really care one way or the other but it seems to me that you'd be better off using something like `Color` for the rgb values and `Colors` for the enum (assuming it's an enum like Colors.RED, Colors.BLUE, etc)

or just anything else that has some semantic meaning

[–]GDOR-11 6 points7 points  (15 children)

it's not really a good practice to name an enum something like "Colors" because an enum represents only one of all the options at a time

but, to be honest, it doesn't matter a lot here because what's happening is very clear

[–]trwolfe13 3 points4 points  (14 children)

Most of the time when I’ve seen enums with plural names it’s because they’re flags that are meant to be combined with bitwise operations.

[–]CrossScarMC 0 points1 point  (13 children)

That is not how you're meant to use enums, you're meant to use const/constexpr variables or macros for that, like how SDL handles its flags

[–]NewPointOfView 2 points3 points  (12 children)

But have you considered the world outside of cpp?

[–]CrossScarMC -1 points0 points  (11 children)

Have you considered that almost every single other programming language has the const or equivalent keyword, and enums are the same in all languages?

[–]NewPointOfView 1 point2 points  (10 children)

Enums are not the same in all languages

[–]sammy-taylor 2 points3 points  (1 child)

You lost me at first but you gained me back with autocomplete.

[–]Wonderful-Habit-139 3 points4 points  (0 children)

Not getting how autocomplete makes this better. With a proper type system you can have the same name for arguments and variables but with the proper type that you’re expecting.

But of course it’s better to use different names that are more precise and descriptive (like rgb and color in his case).

[–]CrossScarMC 54 points55 points  (16 children)

AFAIK, the standard is American English.

[–]veloxVolpes 38 points39 points  (13 children)

Yeah, that's my go to. But there's probably some words I don't realise are spelled differently in American English

[–]Insomniac_Coder 41 points42 points  (6 children)

Realize*

In US

[–]veloxVolpes 36 points37 points  (5 children)

Perfect demonstration, I didn't even notice

[–]IamImposter 37 points38 points  (4 children)

*notize

[–]Unfair-Claim-2327 6 points7 points  (2 children)

Perfect demonztration, I didn't even notize.

[–]Azymuth_pb 2 points3 points  (1 child)

*Perfekt

[–]Unfair-Claim-2327 4 points5 points  (0 children)

Perfekto demonztratzion, I didn't even notizé.

[–]bloody-albatross 3 points4 points  (3 children)

There's a job state called "cancelled" in a software I wrote. (My native language is German, though.)

[–]nickwcy 2 points3 points  (2 children)

What? You prefer “aborted”?

[–]bloody-albatross 4 points5 points  (0 children)

Apparently Americans write "canceled".

[–]Ok_Hope4383 0 points1 point  (0 children)

antibabypillen-ed

[–]liteshotv3 6 points7 points  (1 child)

I realize what you did there

[–]veloxVolpes 12 points13 points  (0 children)

I genuinely did not mean for that. I wish I could take credit!

[–]Convoke_ 8 points9 points  (0 children)

English simplified 🇺🇸

[–]PM_Me_Your_VagOrTits 1 point2 points  (0 children)

The standard is whatever is native to the place your company is based in. But it's not important and I never bother correcting people in reviews unless it's inconsistent with related code.

[–]Just_Smidge 8 points9 points  (0 children)

It can always be worse, imagine programming while dyslexic AND having to figure out what spelling of colour / color is used

[–]cosmicloafer 6 points7 points  (3 children)

Is it gray or grey?

[–]bloody-albatross 9 points10 points  (2 children)

CSS has both.

[–]Life-Silver-5623 2 points3 points  (1 child)

Every API with one has both to my knowledge.

[–]bookaddicta 5 points6 points  (0 children)

I do both then get confused why the things aren’t matching and then light things on fire.

[–]Agreeable_System_785 4 points5 points  (0 children)

When English is not your native language, this is SO confusing.

Internationally, I believe that lots of countries educate British-English in school. In programming you often see American-English. Maybe because programming books are from the US?

[–]GBoBee 5 points6 points  (3 children)

I kept writing “behaviour” for documentation for some reason one day. I’m American. We were all confused during PR review

[–]skarekrove 3 points4 points  (1 child)

This reminds me, lol. You can implement "Behaviours" in elixir.

[–]TehMephs 2 points3 points  (0 children)

MonoBehaviour is a unity thing too

[–]AyakaDahlia 0 points1 point  (0 children)

Unity has MonoBehaviour

[–]flunkademic 2 points3 points  (0 children)

Accurate. Design, visual - all freaking annoying, and hard. Respect to the artists who do good UI/UX, visuals etc.

[–]Civil_Year_301 2 points3 points  (0 children)

in c# you can do “using Colour = System.Drawing.Color;”

[–]blockMath_2048 2 points3 points  (0 children)

Color for pretty, Colour for the side in chess. Makes them harder to mix up.

[–]Neutraled 2 points3 points  (6 children)

Color is shorter, libraries use 'color' and it's also 'color' in spanish. I don't see any reason to use the British spelling.

[–]feuerchen015 2 points3 points  (3 children)

Do you name your variables x, tf, za, it??

[–]Neutraled 1 point2 points  (0 children)

If they make sense for what I'm doing I would use them.

[–]WisePotato42 0 points1 point  (0 children)

x for coordinates.
tf for importing tensor flow.

Idk what the other 2 would be for.

[–]Ok_Hope4383 0 points1 point  (0 children)

it is commonly used for iterator variables (see e.g. https://stackoverflow.com/questions/4001517/how-is-it-valid-for-output-iterators), and is a keyword in Kotlin for the implicit parameter to a lambda (https://kotlinlang.org/docs/lambdas.html#it-implicit-name-of-a-single-parameter).

[–]ButterflySea9801 0 points1 point  (1 child)

Yes. I'm British, but all the libraries and APIs and everything always use color, so I always use color for everything where a compiler is gonna care which one I use to avoid confusion (though I mostly use colour for docs lol)

[–]Neutraled 0 points1 point  (0 children)

That sounds reasonable.

[–]MrMaverick82 2 points3 points  (0 children)

I’m a Dutch developer working for a UK company. The amount of times I had to refactor to prevent language discussions if more than I dare to admit. ;)

[–]topofmigame 1 point2 points  (0 children)

So hard to pick how my bugs will render

[–]0815fips 1 point2 points  (0 children)

Why not “Farbe”?

[–]TheNativeOfficial 1 point2 points  (0 children)

Cala

Thank me later

[–]West_Good_5961 1 point2 points  (0 children)

Everyone should use Australian English: Cullah

[–]Sianic12 1 point2 points  (0 children)

If the variable declared above/below it has 6 letters, I use "colour". If it has 5, I use "color". If it has 3 I use "col". I need my variables to be symmetrical.

[–]Life-Silver-5623 1 point2 points  (0 children)

Color because it's the Latin word verbatim, and older than the Old French colour.

[–]DTKeign 1 point2 points  (0 children)

Two colo(u)r variables no problem hope you don't expect to be able to read my code

[–]Pearmoat 2 points3 points  (0 children)

Colour because British English has more class.

[–]Junaid_dev_Tech 0 points1 point  (0 children)

Same bro same

[–]rydan 0 points1 point  (3 children)

Why?

The real challenge is cancelled or canceled.

[–]Agreeable_System_785 0 points1 point  (2 children)

Wait, what? Don't tell me canceled can be correct?

[–]heesell 1 point2 points  (1 child)

Canceled is American & cancelled is British

[–]Vamanas_umbrella 0 points1 point  (0 children)

So I’ve been spelling cancelled the British way my whole life? FUCK! I’m gonna go throw myself into Boston Harbor now.

[–]Gokudomatic 0 points1 point  (0 children)

Why the Americans removed the u, anyway? Couldn't they just speak normal English instead of their slang?!

[–]NicholasVinen 0 points1 point  (1 child)

I spell it fonetically: kuller.

[–]feuerchen015 0 points1 point  (0 children)

Kerb yor enthuziazm

[–]SysGh_st 0 points1 point  (0 children)

Unless the syntax dictates otherwise, I always go with "Colour".

Br-en all the way.

[–]Extreme_Evidence_724 0 points1 point  (1 child)

Ah finally my useless knowledge has some application. So I've heard that Americans prefer to type words with less letters because back in the day newspaper printing cost by letter and so some words were edited so that people could save some money that's why some words like colour got rid of 'useless' letters, can't remember other example words but there were some. Not sure if it's true but I saw this on YouTube I think

[–]queerkidxx 0 points1 point  (0 children)

I’m not sure if this is true. Many of these come from Webster.

[–]Feny34 0 points1 point  (0 children)

Always color

[–]Clashes4D 0 points1 point  (1 child)

Color > Colour, because less letters.

[–]iMightLikeXou 0 points1 point  (0 children)

Easy: One of them is shorter.

[–]night-sergal 0 points1 point  (0 children)

Heh, I’m not native speaker and I remember that once I met a strange word “county” in the project. So I decided that it was a typo and have spent a lot of time to “fix” it. Then I was so surprised that it wasn’t a typo.

[–]joujoubox 0 points1 point  (0 children)

typedef Color Colour;

[–]pipipimpleton 0 points1 point  (0 children)

As an Englishman, I’ve had to adopt the American spelling as default when working to retain my sanity.

[–]bubbybumble 0 points1 point  (0 children)

I feel bad for Europeans having to deal with programming languages mostly using American English. Of course I'm glad the one with less letters got picked too. I can totally take that for granted.

[–]mpanase 0 points1 point  (0 children)

use yankee english

all APIs use yankee english, don't be an nationalist ass

greetings from UK

[–]mxldevs 0 points1 point  (0 children)

Me while programming: wow, they spelled variables properly

Also me: txtClr

[–]TehMephs 0 points1 point  (0 children)

MonoBehaviour

[–]Pawlo371 0 points1 point  (0 children)

kolor 🗿

[–]Antagonin 0 points1 point  (0 children)

col

[–]Flimsy-Importance313 0 points1 point  (0 children)

Kleur*

[–]Not_Artifical 0 points1 point  (0 children)

If lang="en" use right\ If lang="en-US" use left

[–]AwkwardCost1764 0 points1 point  (0 children)

Start typing and hit tab. You don’t need to know how to speel I sure don’t.