DEV Community

loading...
Cover image for Coding in your native language – have you heard of Legesher?

Coding in your native language – have you heard of Legesher?

minna_xd profile image Minna Nurmiluoto Updated on ・3 min read

As developers, we are used to writing programming commands in English (this is just a pseudo example from my little Java game where I actually use Finnish in variable and function names – gasp – I may actually change it to English at some point):

private int blocks;
private boolean ready;

public boolean addBlock() {
  if (!this.ready) {
    this.blocks++;
    return true;
  }
  return false;
}
Enter fullscreen mode Exit fullscreen mode

For someone who doesn't speak English at all, learning all these keywords requires much more effort compared to someone who already understands English. An English speaker is able to deduct a lot of the code's meaning and, I would imagine, can more easily memorize the programming language.

Take a look at the above example in a language you may not understand:

yksityinen kokonaisluku palat;
yksityinen totuusarvo valmis;

julkinen totuusarvo lisääPala() {
  jos (!tämä.valmis) {
    tämä.palat++;
    palauta tosi;
  }
  palauta epätosi;
}    
Enter fullscreen mode Exit fullscreen mode

How easily do you think you would learn that?
As a Finn, how cool would it be to code like that!

Legesher project wants people to code in their native language

Senja @sjarva introduced me to the delightful Legesher project a while back. The project aims to take a step further from just learning the basics of programming in one's own language: imagine being able to code in your own language!

Senja invited me to help with reviewing the Finnish translations for Python keywords (Python is currently prioritized) and what an eye-opening experience it was! Some of them were very straightforward: false - epätosi, true - tosi, class - luokka, if - jos. Some of them were tricky: elif isn't even English! Some of them were puzzling: for a language like Finnish which doesn't really have prepositions, as, for, from and in require quite creative translation.

We'll see what the original translator and the other reviewers think but I was pretty proud of some of the suggestions I came up with. 😊

English dominates

All the programming/markup/stylesheet languages I know are based on English: HTML, CSS, PHP, Java, JavaScript, Python... I've never had any problem with it (or found it strange) but now this got me thinking, are there any programming languages that are not.

Turns out there are! One of them is Tampio based on Finnish. 👍 What's your favourite?

(Sure, there are entirely symbolic programming languages, but those based on natural languages are more interesting to me.)

You can help with Legesher, too

If you know a language other than English well and want to help with the Legesher project, head on over to the GitHub repo. No matter whether you are translating or reviewing, you need to really think about which word best describes the meaning behind the programming keyword. You cannot just pick the first equivalent from a dictionary.

I suppose that with Legesher I still cannot write Python like this

tulosta('Hei maailma!')
Enter fullscreen mode Exit fullscreen mode

because print is a function name and I don't see them being translated in the project (do correct me if I'm wrong), but the project is a step in that direction – and perhaps function names etc. are in its future plans.

Nevertheless, it was such a fun project to contribute to and I look forward to the reviewing and translation progressing!

Cover photo by Markus Spiske on Unsplash

Discussion

pic
Editor guide
Collapse
lauravuo profile image
Laura Vuorenoja

Using this kind of language could really ease the steps when learning to code, especially if you have poor or no English skills. As they say, learning one more programming language gets every time easier, so switching to "a real", more widely used language could be smoother when you master the basic concepts in your own language. I would love to test learning to code using this language with my slightly older friends who don't speak English at all.

Collapse
minna_xd profile image
Minna Nurmiluoto Author

You should try out the Tampio language for that test! 😄

Collapse
lauravuo profile image
Collapse
yellow1912 profile image
Info Comment marked as low quality/non-constructive by the community. View code of conduct
yellow1912

Completely cool and useless. Imagine the difficulty to share your code (open source in your native language, wtf?). Collaboration in global team will be hell. Applying code samples you find on the net can prove difficult.

I don't know man, as a non native English speaker, the idea sounds completely useless to me. I don't even want my kid to learn it.

Collapse
minna_xd profile image
Minna Nurmiluoto Author

In a way I agree, but I don't see this would be much different from e.g. minification of JavaScript: you are able to write code in a way that is comfortable for you and then it gets processed to a generic (in minification's case, compressed) form. Or just think about basic compiled languages: we write the code in a format that it's easy for us to write but it's not the final format.

Collapse
yellow1912 profile image
yellow1912

That makes sense, but then in that way you need another compiler to compile that to English first? :D

I like the idea. But I think it creates more problems than it solves. I know this problem first hand because English is not my native language. I struggled ablot when I first started programming because in the book I used they translated all words and concepts. The translation is not always smooth (there are words that do not exist or not common in my language). It's also difficult to cross reference documents online as well.

In most recent books, I see that they gave up the whole translation and just use English directly. I think it makes lots of senses. Recently in the PHP world there is a new extension called swoole that is written by a Chinese team. When it's time for them to release to the world they had to make sure that they have English document (and the code itself used English to begin with).

Another language barrier thingy, not directly related, is the Japanese gaming industry. Japanese companies produce a huge number of games, and only some of these great games are known and popular outside of Japan because the rest are in Japanese.

I'm sorry but I still see this as a hobby project, not meant for professional developers. At least not for those who want to share or collaborate with people not speaking their native language. That is my opinion only of course, so it doesn't count. Keep up the work, probably will benefit others well.

PS: I was given a code of conduct warning. I think that is ridiculous. I never insulted anyone, just stated my opinion and experience. Has this community become so sensitive that one dare not say anything in fear of hurting the feeling of others? Then what is the purpose of discussion and debate?

Thread Thread
minna_xd profile image
Minna Nurmiluoto Author

Very good points.

My contribution to Legesher was enlightening but I don't see myself coding in e.g. Finnish, either because I have the privilege of being able to recognize the words I write in code. But if some day someone can create code with it, with more ease than without it... I'll be happy for them.

PS. I don't know about the code of conduct warning. I didn't mind your original comment.

Thread Thread
eevajonnapanula profile image
Eevis (she/her)

I was given a code of conduct warning. I think that is ridiculous. I never insulted anyone, just stated my opinion and experience. Has this community become so sensitive that one dare not say anything in fear of hurting the feeling of others? Then what is the purpose of discussion and debate?

Just wanted to comment here, that discussion and debate are ok, but everyone should be mindful of the tone and words they are using when commenting. The code of conduct here in Dev states, that we should use for example welcoming language, and be respectful of other points of views (so, not dismiss them as, for example, useless).

Thread Thread
yellow1912 profile image
yellow1912

Ok, so if I say it's useless to me wouldn't that make things less offensive and more politically correct? Or that is not allowed as well? Sometimes I miss the reddit style where they can roast you left and right :). Anyhow, noted.

Thread Thread
minna_xd profile image
Minna Nurmiluoto Author

Internet is full of places where people feel it's ok for them to insult other people and where that type of rhetoric is allowed (or even expected?). It's nice that there are places whose ideology is to be a safe place for everyone.

For me personally, it's a huge hurdle to to post anything even on dev.to because I don't feel worthy. But here I feel the community exists to be supportive and not destructive.