January 03, 2006
"John C" <johnch_atms@hotmail.com> wrote in message news:dpb4si$2aoj$1@digitaldaemon.com...
> What's the consensus for API spelling conventions? Should I use my native spelling, British English, or has programming all but standardised on US English?
>
> Most APIs seem to use US spellings of words such as 'colour' ('color'),
> 'centre' ('center') and 'normalise' ('normalize'). Perhaps it's because
the
> well-known ones are written in the US, for example Microsoft's SDK and
.NET
> and Sun's JDK. And HTML is US English (align='center'; color='#CCCCCC').
But
> I have used some libraries that have British (or International) English spellings - Scintilla springs to mind.
>
> Does it even matter, though? Should I just use whatever comes naturally? Which variant do non-English speakers use -- do you write letters, emails etc in British English but program in US English? Have I opened a can of worms (because Canadian and Australian English, for instance, borrow from both)?

Strategies:

    1. chose neutral where possible
    2. Use contractions where appropriate - e.g. one can avoid
initialise/initialize with init. But contractions are generally frowned on
in public interface
    3. Use typedefs / alias
    4. Use overloads, when they do not risk screw ups
    5. Stubbornly do what is native to you

And, when all else fails, thought it gauls me to say so, the best strategy is probably ... no, I can't say it! ... er ... howl .... to use US English spelling. :-(



January 03, 2006
"S. Chancellor" <dnewsgr@mephit.kicks-ass.org> wrote in message news:dpc3bq$1ru5$1@digitaldaemon.com...
>
> "John C" <johnch_atms@hotmail.com> wrote:
>>What's the consensus for API spelling conventions? Should I use my native spelling, British English, or has programming all but standardised on US English?
>>
>>Most APIs seem to use US spellings of words such as 'colour' ('color'),
>>'centre' ('center') and 'normalise' ('normalize'). Perhaps it's because
>>the
>>well-known ones are written in the US, for example Microsoft's SDK and
>>.NET
>>and Sun's JDK. And HTML is US English (align='center'; color='#CCCCCC').
>>But
>>I have used some libraries that have British (or International) English
>>spellings - Scintilla springs to mind.
>>
>>Does it even matter, though? Should I just use whatever comes naturally? Which variant do non-English speakers use -- do you write letters, emails etc in British English but program in US English? Have I opened a can of worms (because Canadian and Australian English, for instance, borrow from both)?
>>
>>
>
> Since D has aliases, why don't you do both?  Then we don't have to go looking through the documentation when Object.Color is missing :)

I've been playing around with aliasing symbols, but it's not possible to override an alias for a class method, so this approach would lead to inconsistency.

struct Color { ... }
alias Color Colour;

class ColorPicker {

    private Color color_;

    Color color() { return color_; }
    void color(Color value) {
        color_ = value;
        onColorChanged();
    }
    alias color colour;

    protected void onColorChanged() { ... }
    alias onColorChanged onColourChanged;

}
alias ColorPicker ColourPicker;

class MyColourPicker : ColourPicker {

    protected override void onColourChanged() { ... }

}

Produces error: function MyColourPicker.onColourChanged function onColourChanged does not override any.


January 03, 2006
John C wrote:

[...]
> Which variant do non-English speakers use
[...]

English teached in schools tolerates mixed usage.

In programming tolerance increases towards wrong spellings, like "putted".

-manfred
January 03, 2006
"Matthew" <matthew@hat.stlsoft.dot.org> wrote in message news:dpcf3l$2qq3$1@digitaldaemon.com...
>
> "John C" <johnch_atms@hotmail.com> wrote in message news:dpb4si$2aoj$1@digitaldaemon.com...
>> What's the consensus for API spelling conventions? Should I use my native spelling, British English, or has programming all but standardised on US English?
>>
>> Most APIs seem to use US spellings of words such as 'colour' ('color'),
>> 'centre' ('center') and 'normalise' ('normalize'). Perhaps it's because
> the
>> well-known ones are written in the US, for example Microsoft's SDK and
> .NET
>> and Sun's JDK. And HTML is US English (align='center'; color='#CCCCCC').
> But
>> I have used some libraries that have British (or International) English spellings - Scintilla springs to mind.
>>
>> Does it even matter, though? Should I just use whatever comes naturally? Which variant do non-English speakers use -- do you write letters, emails etc in British English but program in US English? Have I opened a can of worms (because Canadian and Australian English, for instance, borrow from both)?
>
> Strategies:
>
>    1. chose neutral where possible

Yip. I've also considered using synonyms for concepts like 'colour', but hue, chroma, shade, cast and tint etc have different meanings in computing terms (especially in graphics apps). And pigment, tinge and tinct are just too purple, as it were.

>    2. Use contractions where appropriate - e.g. one can avoid
> initialise/initialize with init. But contractions are generally frowned on
> in public interface

And there's a horrific trend in some languages where vowels are removed from words to make function names shorter.

>    3. Use typedefs / alias

Looked like a nice solution, until I discovered aliases for functions can't be used to override the original.

>    4. Use overloads, when they do not risk screw ups

Might lead to inconsistency when overloads can't be used.

>    5. Stubbornly do what is native to you

I wouldn't think of changing my spelling in an article just to make it easier for my US friends to read. I guess code is a different matter.

>
> And, when all else fails, thought it gauls me to say so, the best strategy is probably ... no, I can't say it! ... er ... howl .... to use US English spelling. :-(
>

That's the conclusion I've reached, too. It's not a big deal, but it was a fun investigation.


January 03, 2006

John C wrote:
> "S. Chancellor" <dnewsgr@mephit.kicks-ass.org> wrote in message news:dpc3bq$1ru5$1@digitaldaemon.com...
> 
>>"John C" <johnch_atms@hotmail.com> wrote:
>>
>>>What's the consensus for API spelling conventions? Should I use my native
>>>spelling, British English, or has programming all but standardised on US
>>>English?
>>>
>>>Most APIs seem to use US spellings of words such as 'colour' ('color'),
>>>'centre' ('center') and 'normalise' ('normalize'). Perhaps it's because the
>>>well-known ones are written in the US, for example Microsoft's SDK and .NET
>>>and Sun's JDK. And HTML is US English (align='center'; color='#CCCCCC'). But
>>>I have used some libraries that have British (or International) English
>>>spellings - Scintilla springs to mind.
>>>
>>>Does it even matter, though? Should I just use whatever comes naturally?
>>>Which variant do non-English speakers use -- do you write letters, emails
>>>etc in British English but program in US English? Have I opened a can of
>>>worms (because Canadian and Australian English, for instance, borrow from
>>>both)?
>>>
>>>
>>
>>Since D has aliases, why don't you do both?  Then we don't have to go
>>looking through the documentation when Object.Color is missing :)
> 
> 
> I've been playing around with aliasing symbols, but it's not possible to override an alias for a class method, so this approach would lead to inconsistency.
> 
> struct Color { ... }
> alias Color Colour;
> 
> class ColorPicker {
> 
>     private Color color_;
> 
>     Color color() { return color_; }
>     void color(Color value) {
>         color_ = value;
>         onColorChanged();
>     }
>     alias color colour;
> 
>     protected void onColorChanged() { ... }
>     alias onColorChanged onColourChanged;
> 
> }
> alias ColorPicker ColourPicker;
> 
> class MyColourPicker : ColourPicker {
> 
>     protected override void onColourChanged() { ... }
> 
> }
> 
> Produces error: function MyColourPicker.onColourChanged function onColourChanged does not override any. 
> 
> 

Smells like a bug to me.  Unless, of course, the 'alias' is not supposed to be inherited, which wouldn't quite seem right to me.  I know Mango uses method aliasing A LOT, might go compare code...  (I haven't read much of the Mango source for a while.)

-- Chris Sauls
January 04, 2006
John C wrote:
> What's the consensus for API spelling conventions? Should I use my native spelling, British English, or has programming all but standardised on US English?
> 
> Most APIs seem to use US spellings of words such as 'colour' ('color'), 'centre' ('center') and 'normalise' ('normalize'). Perhaps it's because the well-known ones are written in the US, for example Microsoft's SDK and .NET and Sun's JDK. And HTML is US English (align='center'; color='#CCCCCC'). But I have used some libraries that have British (or International) English spellings - Scintilla springs to mind.
> 
> Does it even matter, though? Should I just use whatever comes naturally? Which variant do non-English speakers use -- do you write letters, emails etc in British English but program in US English? Have I opened a can of worms (because Canadian and Australian English, for instance, borrow from both)? 
> 
> 
American English here. It's the more common one, and also in some cases a bit more uniform/direct . For instance, 'center' is written much more like the way it sounds, 'centre' on the hand looks French to me :)
1 2
Next ›   Last »