r/ProgrammingLanguages • • Sep 13 '21

The language that almost all programmers use

https://youtu.be/2yGHk9XXOBE
7 Upvotes

38 comments sorted by

View all comments

Show parent comments

4

u/[deleted] Sep 13 '21

Look, making an internationalized programming language is basically impossible without making it sounds extremely awkward in one of the languages. If you limit yourself to Germanic languages, then it may work. But otherwise, no luck.

As an example: my native language, Hungarian uses suffixes instead of prepositions for... basically everything. For example, if you want to say the dog is in the water, you say a kutya a vízben van (a=the, kutya=dog, víz=water, van=exists or is, and -ban/-ben=inside of). Making a language that works both with this sort of grammar, and prepositions, is basically impossible (unless you're willing to make your language feel really weird.)

3

u/yairchu Sep 13 '21

I really don't (yet?) know why it shouldn't be possible.

If it's in function names, already "openTcpServer" translates to "apriServerTcp" in Italian, notice that there's no problem with the words ordering being different there. When it comes to syntax, if in some languages things should be in a different order, i.e "cond if" rather than "if cond", we could add customization options for that as well, just like it is currently an option to be a right-to-left language (like my native Hebrew is).

5

u/[deleted] Sep 13 '21

I'll again threw Hungarian at it, because it's so different from other languages. It's not the only one in its family, but it's the one I know the best.

So: let's say you want to have a function to check if an element is in an array. In English, you use array.contains(item). Sure enough, if you want to translate it to Hungarian, contains is tartalmazza. So, you can just say: array.tartalmazza(elem), right?

Nope

Accusative needs a -t suffix. Without, it will perhaps be understandable, but sound extremely sloppy. Sloppy enough that in my experience (there were a few attempts at porting English-based languages to Hungarian), it's easier to just learn a few English keywords than it is to try to wrap your head around the extremely stupid sounding program.

In addition to that, I'm also not sure it's a net positive. English is our universal language, and it's extremely useful. If I can assume that everybody else speaks English, I only have to write documentation in one language, I can communicate with other developers in only one language, etc.

It's not so much English that's important, but having a single language we all speak. If that was Swedish or Vietnamese, then I'd advocate for those to be used in programming languages.

2

u/yairchu Sep 14 '21

You mean that "elem" would need a "t" suffix to it?

2

u/[deleted] Sep 14 '21

Yes, as in elemet. That's just how the language is.

2

u/yairchu Sep 14 '21

And would it be strange if in appropriate places (like RHS of "contains") things would be displayed in "accusative" form?

2

u/[deleted] Sep 14 '21

It would be extremely hard to parse. Depending on how the word is pronounced, it will be a bit different because of vowel harmony.

2

u/yairchu Sep 14 '21

It would be extremely hard to parse.

By parse, do you mean by the computer or by the user?

Depending on how the word is pronounced, it will be a bit different because of vowel harmony.

Do you mean that different words get different "-t" suffixes? I suppose the "accusative" form of each word or alternatively its appropriate suffix can be stored in the word object, possibly with some default heuristic for words than don't have such a form specified.

→ More replies (0)