Thread: C++ and real languages

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    266

    C++ and real languages

    I know that C++ and probably most programming languages were meant to stay in english, but has a port to other real languages ever been considered or even done for C++? I mean, what makes english so special? I have always seen english as a bad, unorganized language anyways(not that any other language is better).

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    If I'm not mistaken, I've read on the Daily WTF that Excel macro language (?) has been localized and it seems just to be creating more problems (documents created in one country cannot be used in other countries?)

    As to English being bad, syntactically it seems to be one of the simplest languages (for example, it has very little declination, no genders and such). Plus, it doesn't have special characters (the ASCII chart is modeled after English).

    And of course, if you really want to (feature on TDWTF yourself), it should be very simple to localize all the keywords (it is undefined behaviour, though):

    Code:
    #define wenn if 
    #define für for
    #define weil while 
    ...
    Probably won't work for standard libraries, but perhaps you could create wrappers for everything?

    And this belongs in General discussion...
    Last edited by anon; 09-03-2008 at 01:10 PM.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    English is the lingua franca of programming. Seriously, a very large percentage of everyone who programs (or probably who deals with computers in general) uses (or knows) English.

    I'm pretty sure it's in the GNU coding standards: comment your programs in English, because it's so widely understood.

    It's probably a side-affect of having so many North American programmers.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The problem with a computer language based on non-english is that it is only available to those that speak that particular language. A very large proportion of the world are capable of speaking some english - which is more than can be said about German, French, Swedish, Dutch, and most other languages. Sure, there are more people speaking Chinese (and probably one or two of the languages in India) than there are speaking English, and there's a large number of spanish speakers. But for computer programming, you need a decent amount of education, at which point it's likely that you also have a basic level of English as well.

    The details/preciseness of the natural (human) language is irrelevant to the computer language implementation because the meaning of each word is (assuming a sane implementation) is precisely defined - rather than the natural language where a word can have many meanings.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by lruc View Post
    I mean, what makes english so special?
    Its the most spoken language in the developed world.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I have been worked for two larger companies when I lived in Sweden. Both of these companies had as standard to write documentation and comments in English.

    I know of German and French companies that have the same standard.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by abachler View Post
    Its the most spoken language in the developed world.
    That would be my answer, as well.
    It would make the world better if there was only one language.
    English is pretty much the de-facto standard language, so why would they not model it after english?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    IMO, English's distinguishing factor is that its alphabet fits into a signed char, which only has less importance now than it did in the 30s and 40s. Other languages such as Chinese would not have had the room for their alphabet. So apart from that, I won't be accused of ethnocentrism.

  9. #9
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    It would be nice if English had 1 letter for each possible sound, rather than having to use things like 'th' or 'sh' and 1 meaning for every word. It would greatly simplify the language. But it is what it is, so what can you do?

  10. #10
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Learn Esperanto.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  11. #11
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by citizen View Post
    IMO, English's distinguishing factor is that its alphabet fits into a signed char, which only has less importance now than it did in the 30s and 40s. Other languages such as Chinese would not have had the room for their alphabet. So apart from that, I won't be accused of ethnocentrism.
    Well, most of the modern computer languages were developed in the US Universities and companies between 1950-1970 , such as Fortran, Cobol, Algol, etc. The US defence industry was one of the instigators to this. Some where developed elsewhere, and/or later, but generally still in English. Erlang is a language that was developed in Sweden, but it is still using English as the "natural" language.

    There are of course exceptions - but as Anon pointed out, you get problems with multiple source language source code if the language is not the same all over the world.

    Another exception is APL, which uses "no language", as in it uses special symbols to indicate the operations, functions etc. http://en.wikipedia.org/wiki/APL_(programming_language)

    I'm sure they had computers in China in the 60's, but it would not have a very wide coverage.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #12
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    >>It would be nice if English had 1 letter for each possible sound, rather than having to use things like 'th' or 'sh' and 1 meaning for every word. It would greatly simplify the language. But it is what it is, so what can you do?

    I agree completly, and unforunatly, nothing except complain. I don't think time is laid out all that well either, but it standard, so why mess with it? If only everything was as simple and well thought out as the metric system.

  13. #13
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    In the late 1800's and early 1900's, several of the European languages went through a reform to simplify/standardize the spelling to pronunciation correllation - for example Spanish and Italian have such "strict correlation between spelling and how it sounds" - there are a few rules besides "what does letter <x> sound like", such as "ch" is pronounced "k" [why not use K one can ask, but so it is], and "gn" is pronounced more like "nj" or "ny", so "gnochi" is not pronounced the way it looks for someone from outside of italy, but "nyoki".

    George Bernard Shaw was one to propose such reform. More here: http://en.wikipedia.org/wiki/English_spelling_reform

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  14. #14
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Study more philology if you want to know why English is spelled the way it is. Much of the argument for spelling reform comes from the (alleged) proliferation of dyslexia and illiterates, and whether or not they're more important than our language's history. That's a rather blunt way to say it, but I'm assuming bad spelling is less of a barrier than it used to be to student's and people in the professional world.

    I also saw something kind of funny that demonstrated the horror of reformed spelling, but I won't be able to find it.

  15. #15
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    I'm pretty sure there was a "German C" compiler. Basically, all the keywords had German replacements. The standard library might have been translated, too.

    And of course there's Lingua Romana Perligata.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed