insignificant question about spelling

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi

with regards to naming - eg methods or properties - I wonder sometimes
about British vs American spelling. The c# language obviously uses
American spelling, "serializable" or "color" for example.

In my classes should I also follow this? Or is it ok to use British
spelling?

Recently for example I had to write a method to serialise some data,
and I called it SerialiseUser. Would this confuse other programmers?

What about a method "Color GetColour()"?


/Peter

--
 
Peter said:
with regards to naming - eg methods or properties - I wonder sometimes
about British vs American spelling. The c# language obviously uses
American spelling, "serializable" or "color" for example.

In my classes should I also follow this? Or is it ok to use British
spelling?

Recently for example I had to write a method to serialise some data,
and I called it SerialiseUser. Would this confuse other programmers?

What about a method "Color GetColour()"?

If there are existing classes in the framework (or other libraries
you're using) which use the same word, I'd stick with that spelling. If
it's terminology which is relatively local, I'd use that. So, for
instance:

Color BackgroundColor
bool HonourUserPreferences

Of course, if you're writing an internationally-available library, it's
probably best to stick with US English anyway. That also gives the
advantage of consistency, which is usually a good thing...
 
Hi

with regards to naming - eg methods or properties - I wonder sometimes
about British vs American spelling. The c# language obviously uses
American spelling, "serializable" or "color" for example.

In my classes should I also follow this? Or is it ok to use British
spelling?

Recently for example I had to write a method to serialise some data,
and I called it SerialiseUser. Would this confuse other programmers?

Well, there are those of us who follow the Oxford English Dictionary
and prefer
SerializeUser anyway (following both the Latin root and the sound of
the word).
What about a method "Color GetColour()"?

That just causes so much confusion, I think you are stuck with Color
GetColor().

What do other non-"En-us" speakers do? Do Germans write "Color
BekommenFarbe()"
 
Peter said:
with regards to naming - eg methods or properties - I wonder sometimes
about British vs American spelling. The c# language obviously uses
American spelling, "serializable" or "color" for example.

In my classes should I also follow this? Or is it ok to use British
spelling?

Recently for example I had to write a method to serialise some data,
and I called it SerialiseUser. Would this confuse other programmers?

What about a method "Color GetColour()"?

You definitely should use english instead of your native language
(if it differs).

But I would say that US versus UK english is not important. It is all
about readability. British and americans are capable of reading each
others languages. The rest of us are probably not capable of telling
whether it is US or UK english anyway.

Consistency is always good, but there are many more important
areas to focus on.

Arne
 
What about a method "Color GetColour()"?
But I would say that US versus UK english is not important. It is all
about readability. British and americans are capable of reading each
others languages. The rest of us are probably not capable of telling
whether it is US or UK english anyway.

Consistency is always good, but there are many more important
areas to focus on.

The problem is being able to remember how you yourself did it. When in
England, I still write programs in American spelling because I don't want to
get 2 spellings of the same name into the same program.

As has been observed, the CLR forces some American spellings on us, such as
Color.
 
You definitely should use english instead of your native language
(if it differs).

But I would say that US versus UK english is not important. It is all
about readability. British and americans are capable of reading each
others languages. The rest of us are probably not capable of telling
whether it is US or UK english anyway.

Consistency is always good, but there are many more important
areas to focus on.

Arne

I'm a strong supporter of Esperanto for instance method definitions,
Kikongo for local variable definitions, Kalaallisut for member
variable definitions, and Hebrew for static variable defintions, and
Swahili for static member definitions.

Having said that, we do have had some difficulty finding people who
are comfortable with all these languages, so for the moment we make do
with American English.
 
Michael said:
The problem is being able to remember how you yourself did it. When in
England, I still write programs in American spelling because I don't want to
get 2 spellings of the same name into the same program.

Is that really a problem ?

I would have imagined that the compiler and intellisense would
find and resolve those problems rather quickly.

Arne
 
I'm a strong supporter of Esperanto for instance method definitions,
Kikongo for local variable definitions, Kalaallisut for member
variable definitions, and Hebrew for static variable defintions, and
Swahili for static member definitions.

That's one way to obfuscate your code!

Chris
 
You definitely should use english instead of your native language
(if it differs).
Why?

I can certainly see why you would want to use words from the Framework
for concepts that are covered by the framework. But for problem
domain concepts, why bother translating them to English - particularly
as there may not /be/ an equivalent word in English.
But I would say that US versus UK english is not important. It is all
about readability. British and americans are capable of reading each
others languages. The rest of us are probably not capable of telling
whether it is US or UK english anyway.

Consistency is always good, but there are many more important
areas to focus on.
Well, correctness trumps everything, but consistency is pretty near
the top of my list of desiderata.

I certainly regard a careful choice of names as important.
 
Martin said:

Because there will practically never be any guarantee that
the code will always be maintained by someone that understand
the native language. You can expect those that they will
understand english.

Arne
 
What do other non-"En-us" speakers do?  Do Germans write "Color
BekommenFarbe()"

Actually, that would more likely be "HoleFarbe()"; and no, we don't ;)
I use American English in my code, since its what the framework uses
and it may help future developers to maintain the code if they don't
speak German for whatever reason.
English is pretty much the lingua franca of our day, so I don't see a
problem with that approach.
The only frustrating thing is that many Germans don't really speak
English all that well, so sometimes you do end up with terribly named
functions or database fields/tables.

Kevin Wienhold
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top