[OT] spelling colour / color was Re: Toggle

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Oct 10 08:52:01 CEST 2014


mm0fmf wrote:

> On 09/10/2014 02:29, Steven D'Aprano wrote:
>> Apart from the horrible spelling of colour :-)
> 
> I've always spelt colour as "color" when programming and as "colour"
> when writing language including documentation about software.
> 
> colour in a programme doesn't seem right.

"Normal" programmers spell words the same in code as they do outside of
code, e.g.:

    age
    address
    length

modulo the odd abbreviation like "len", "addr", etc., and coding conventions
like camelCase, underscore_words, sHungarianNotation, etc. So if you spell
colour with a U outside of code, I would expect you to spell it with a U
inside of code too.

Unix programmers take every opportunity to obfuscate their code by dropping
nouns and consonants, so I'd expect them to spell "colo(u)r" as something
like clr, colr, clor, or even clour.

Web programmers tend to make random spelling mistakes ("referer"), so I'd
expect "coluor", or perhaps "kolour".

But I've never come across your convention of spelling it "colour" in
documentation and "color" in code before. How very strange.



-- 
Steven




More information about the Python-list mailing list