ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
61.16k stars 10.31k forks source link

Better to use the term colorful than colored #3528

Closed Lecrapouille closed 4 years ago

Lecrapouille commented 4 years ago

I'm French and my English is not good but you should replace the term "colored" by "colorful" :

To be confirmed by people speaking natively English. Indeed, colored is an outdated term and could be offensive since it designates non-white person. This post has no relation at all with current political actuality but just a typical mistake made by frenchmen (and that my teacher suceeded to make me learn) so please I opened this ticket not for debating/trolling (such git master => git main) but just for notifing an suggestion.

Lecrapouille commented 4 years ago

Thanks for the vote. So I close the ticket.

ocornut commented 4 years ago

Hello,

Thanks for the vote. So I close the ticket.

This is not a democracy :)

I'm generally in favor of those (see e.g. 963839373cf376b29eb1a5b990cccd40b50d75f3). In this specific case it can be tricky to change API and the proposed ColorText() would strongly defeat the common pattern we use. There's a bunch of functions mirroring that naming logic: TextWrapped(), TextDisabled(), AddRectFilled() etc. I suppose TextColor() would work but it can be ambiguous as it would be named like an attribute.

I'm taking note (and skimmed through https://en.wikipedia.org/wiki/Colored). In the short-term I don't think its worth touching the public API, but e.g. the change to "colorful" makes sense in the context of that demo treenode you referred to so I'll change it and will change comments as well.

As for master > main I'm waiting for git+github to provide necessary tools to make it possible to have a seamless transition without breaking existing checkout + PR. They stated they are working on something. (As a test I renamed another repository a few months ago and I noticed it broke checkout and some people didn't notice.)

rokups commented 4 years ago

Primary definition of "colored" is "having a color" while primary definition of "colorful" is "having striking colors". So "colorful" would also be incorrect. There is also nothing racist about ithis word in given context.

https://www.merriam-webster.com/dictionary/colored https://www.merriam-webster.com/dictionary/colorful

On October 15, 2020 21:06:50 omar notifications@github.com wrote:

Hello, Thanks for the vote. So I close the ticket. This is not a democracy :) I'm generally in favor of those (see e.g. 9638393). In this specific case it can be tricky to change API and the proposed ColorText() would strongly defeat the common pattern we use. There's a bunch of functions mirroring that naming logic: TextWrapped(), TextDisabled(), AddRectFilled() etc. I suppose TextColor() would work but it can be ambiguous as it would be named like an attribute. I'm taking note (and skimmed through https://en.wikipedia.org/wiki/Colored). In the short-term I don't think its worth touching the public API, but e.g. the change to "colorful" makes sense in the context of that demo treenode you referred to so I'll change it and will change comments as well. As for master > main I'm waiting for git+github to provide necessary tools to make it possible to have a seamless transition without breaking existing checkout + PR. They stated they are working on something. (As a test I renamed another repository a few months ago and I noticed it broke checkout and some people didn't notice.) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ocornut commented 4 years ago

The dictionary link you posted literally has definitions that are marked with the word "offensive", so it doesn't seem wise to only focus on the "Primary definition"?

I only used the word colorful in the demo treenode leading to text using various colors, I agree it would be incorrect in the API name.

Lecrapouille commented 4 years ago

@ocornut This is not a democracy :) Haha yes, I'm pretty sure of that! Reopen this if needed. I'm aware that changing API name will make more people grumpy. That is why I said in my first comment it was just an observation while possibly you can add the deprecated pragma then change it when, for example, https://github.com/ocornut/imgui/issues/902 will be closed.

@rokups thanks for your links matching mine https://www.wordreference.com/enfr/colored I asked an US friend of mine matching your comment: "Coloured is a racist term in the United States ... I think in this text, the code, coloured makes more sense grammatically but colourful works just as well ... Coloured in general can mean you put colour on something in the past tense".

rokups commented 4 years ago

Let me explain more clearly why this is so wrong.

I asked an US friend of mine matching your comment: "Coloured is a racist term in the United States ...

What your friends confirmed is that colored can be a racist term depending on the context, but by default it is not (as per dictionary). This brings us to primary definition of the word. Primary definition is an idea word communicates by default (not applicable to homonyms, but in our case it is irrelevant). This is only important if we have no context. And in our case we have a context. Webster dictionary also defines alternative word meanings in different contexts. Because "text" is not human - word "colored" has no racial meaning. Claiming that it is - is taking word out of context and assigning it a different meaning based on personal preferences.

Coloured in general can mean you put colour on something in the past tense

Which is what happens with the text. In order for text to have a color it must get that color some time before observation. There is no conflict in using a past tense in programming. Code describes expected output here. Where if we used "colorful", it would be confusing, because we would expect text to have many colors. Google's logo is a colorful text, which is not what demo displays.

All in all this is a kind initiative aimed at a wrong target, which results in an imitation of positive change, reducing quality of software by insignificant tiny bit. However these instances have to be pointed out in order to prevent us from creating a newspeak where we censor benign words. You could have some kind of argument regarding "master/slave", but "colored" is completely benign here. People were aware of colors long before people were aware of different races after all.

And if you are not convinced then maybe we should ban following:

See, this is getting out of hand.

If you want a positive change in the world, support education of impoverished child instead: https://dms.childrenincorporated.org/Donor/CISponsorChild.aspx If you opened that page you would notice that majority of children are non-white. Poverty and lack of education is why we do not have enough engineers from racial minorities, not "colored" or "master/slave" in codebase.

xphip commented 4 years ago

If you want a positive change in the world, support education of impoverished child instead:

The question is just about replacing words of the same meaning and not alternative solutions for how to save the world.

There is also nothing racist about ithis word in given context.

I fully agree however, the issue is just an "cultural appeal", also...

This is not a democracy :)

.

reducing quality of software by insignificant tiny bit

I do not believe that the Linux kernel will lose quality by changing terms.

Which is what happens with the text. In order for text to have a color it must get that color some time before observation. There is no conflict in using a past tense in programming. Code describes expected output here.

Despite being a pattern of the Dear ImGui, the understanding is ambiguous because it doesn’t refer to what kind of action it refers to at first reading, you need an interpretation beyond (is it colored/ful? was it colored/ful?). Each language can (and does) have N design patterns, a pattern can have variances (like CamelCase) and the software can have your own (how is in this case) but it is a consensus to use verb + noun (e.g. ImGui::PushStyleColor()) to manipulate an entity and TO BE verb phrases for actions (e.g. ImGui::IsItemHovered()). In general, neither "colored" nor "colorful" are suitable nomenclatures for the context of the method.

In this specific case it can be tricky to change API and the proposed ColorText() would strongly defeat the common pattern we use.

.

frink commented 4 years ago

The question is just about replacing words of the same meaning and not alternative solutions for how to save the world.

I don't thing we need code police to remove "colored" programming from our lives. I've NEVER found a programmer offended by the source use of any form of the word "color", and I've been programming for over two decades on three continents with MANY races and cultures as peers.

I fully agree however, the issue is just an "cultural appeal"...

How exactly can changing any of the uses of "colored" add to "cultural appeal"??? A quick grep shows the only uses of the word "colored" in the ImGui source are for ImGui::TextColored() and many references to "colored square" in the documentation and comments. The only visible reference is in the imgui_demo.cpp which reads "Colored Text"...

In this specific case it can be tricky to change API and the proposed ColorText() would strongly defeat the common pattern we use.

Racial politics probably should NOT dictate changes in the source code of a UI framework... Everyone knows that the world is almost always more loving than either side of the stupid American debate about which "colored" lives matter the most. Most every other culture is proud to be "colored". India has a whole day set aside for celebrating all "colored" things in the universe. This has been adopted by Russia, Malaysia, South Africa, Brazil, and almost every other major country of the world... Isn't colored life beautiful anyway?

So in conclusion, I don't see any point in changing the word "colored" anywhere in the ImGui source...

...or maybe the issue REALLY IS black an white?... 😜

ocornut commented 4 years ago

I am going to lock this topic as the majority of you probably haven’t ever read a book about eg structural racism and it is frankly embarassing to have those naive discussions happening here, I’d rather not let you make it worse.