This is neat! People who like this might be interested in the awesome Hedy language[0]. It's purpose is education, but it's a single programming language with lots of localisations. Always suprised this idea isn't pursued more elsewhere.
This is a nice idea but while the home page was correctly localized in French as my browser is, I couldn't find a way to see "teaching" or "learning" parts of the website in French. At least on mobile, there's no way to tell the site to change language, and it doesn't properly do that on its own based on the browser's preferences. This defeats the whole idea…
i've always given the advice "program in english, comments, variables, function names, everything", and "always use a uk/us keyboard unless you absolutely have to enter localised strings, and even better get someone else to do that"
I've been working with a codebase for a very specific domain where hardly anyone even knew the English terms for the domain-specific things (and some of them probably didn't even exist - highly localized customs etc.). No point in using English then.
I’ve seen before that this is not followed in certain cases, such as the entire development team being in a specific country where some or many team members don’t know English (well enough). As an anecdote, I’ve seen a team in a large multinational company (US origin) in Spain that used function names, variable names, database table names (and column names), log message text and many other things in Spanish. English was only for the language keywords because that’s what the compiler would accept.
The smart projects that are going for L10N will collect all the UI strings into a file or set of files, separate from the code, and indexed so that the app can just switch language and then begin using a new set of localized strings. This also makes for easy translation where you don't need to rebuild the app, just expand the data files that it's using. Is this not the only way to build apps today, or are "localized strings" still being hardcoded??
Draig is built on L10N and code can be passed to/from Welsh <=> Other (eg English) … the keywords are translated back and forth, but comments and identifiers are whatever the coder writes.
I can only speak for Japan, but I suspect China is the same. In Japan, English programming is the norm because all mainstream programming languages are written in English. Keywords, libraries and documentation are in English, so there's not really any getting around the fact that you have to learn to read at least some English. Some Japanese developers do write identifiers in Japanese where languages support it, and documentation / comments are often written in Japanese, of course.
I, personally, think this is a lamentable state of affairs that raises the barrier to entry for programming, especially for children. There are education-oriented Japanese programming languages that try to fill the niche for teaching children, but I think it would be beneficial if there were serious languages with a full ecosystem rather than ones designed to be training wheels before learning English programming languages.
Why not use a pre-processor or something like it to simply translate the keywords etc? I know that there isn’t a 1:1 match between English words and words in other languages, but you should be able to get something close enough.
I actually have done that, but there are still problems. It doesn't really do anything to help somebody who can't read English because things like error messages and libraries are still in English, and it doesn't play nicely with IDE tooling, which is fixable in open-source editors but not proprietary editors. It ends up being a lot of effort for an experience that feels very much second-class.
The first STM32 "bluepill"-based SCSI to SD adaptor I ever used had all its source code in Chinese.
Google Translate did a not terrible job of turning all the comments into English but also mangled the code in exciting new ways, but with a bit of ingenuity to apply the Artificial Intelligence translations, and a bit of bloodymindedness when applying the Analogue Idiocy to hacking it all about with search-and-replace, I got a pretty plausible translation of it.
As someone who's spoken English since 5, I'm perplexed by this question. I'm genuinely unfamiliar with any perceived downsides and I would love to hear more of your thoughts
for (int i = 0; while i < fruitbasket.Count; i++)
fruitbasket[i].Eat();
Even as a low-level programmer, I truly loathe C-style for loops. It takes several seconds to parse them, while the C#-style foreach is instantly grokkable with zero mental overhead. When you're scanning over thousands of lines of codes, the speed and ease of reading constructs like these adds up and makes a huge difference. The desire to apply human-friendly syntax to low-level programming is among the greatest motivating factors for the language I'm working on. All of that being said, I think there is a huge advantage in having code that reads like natural language you understand, rather than having keywords that are foreign and meaningless to you.
Not at all. I'm comparing two different syntaxes that can reliably compile to the same machine code. A syntax that produces non-deterministic results is a completely different matter.
I know it’s just a joke but the “ll” in Welsh is a completely distinct character in the Welsh alphabet and doesn’t sound anything like “l”, nor is it used as a substitute for l. It’s rarely used but it has its own Middle-Welsh character: ỻ
This is neat! People who like this might be interested in the awesome Hedy language[0]. It's purpose is education, but it's a single programming language with lots of localisations. Always suprised this idea isn't pursued more elsewhere.
[0] https://www.hedy.org/
This is a nice idea but while the home page was correctly localized in French as my browser is, I couldn't find a way to see "teaching" or "learning" parts of the website in French. At least on mobile, there's no way to tell the site to change language, and it doesn't properly do that on its own based on the browser's preferences. This defeats the whole idea…
If the author is reading this: one of the code examples says "use L10N::NL" but I think it should be CY :)
Can't wait for a Raku implementation of Lingua::Romana::Perligata.
Nothing stopping you from creating a L10N::LA module :-)
Richard (the dev) has wrote a good "how to" post on the creation process
https://dev.to/finanalyst/creating-a-new-programming-languag...
Question: is it a good idea to introduce kids to coding in their mother tongue like this?
It's already been linked in comments here but there's been a bit of exploration in that area with Hedy. There's some good references to prior work and comments of relevance in this paper https://hedy.org/research/A_Framework_for_the_Localization_o....
i've always given the advice "program in english, comments, variables, function names, everything", and "always use a uk/us keyboard unless you absolutely have to enter localised strings, and even better get someone else to do that"
I've been working with a codebase for a very specific domain where hardly anyone even knew the English terms for the domain-specific things (and some of them probably didn't even exist - highly localized customs etc.). No point in using English then.
I’ve seen before that this is not followed in certain cases, such as the entire development team being in a specific country where some or many team members don’t know English (well enough). As an anecdote, I’ve seen a team in a large multinational company (US origin) in Spain that used function names, variable names, database table names (and column names), log message text and many other things in Spanish. English was only for the language keywords because that’s what the compiler would accept.
The smart projects that are going for L10N will collect all the UI strings into a file or set of files, separate from the code, and indexed so that the app can just switch language and then begin using a new set of localized strings. This also makes for easy translation where you don't need to rebuild the app, just expand the data files that it's using. Is this not the only way to build apps today, or are "localized strings" still being hardcoded??
Draig is built on L10N and code can be passed to/from Welsh <=> Other (eg English) … the keywords are translated back and forth, but comments and identifiers are whatever the coder writes.
China disregards that and there is an absolutely massive ecosystem of Free and Open Source Software out there if you can read and write their code.
I know little about china (except i like the food and art) but do they actually write code in their native language(s)?!
I can only speak for Japan, but I suspect China is the same. In Japan, English programming is the norm because all mainstream programming languages are written in English. Keywords, libraries and documentation are in English, so there's not really any getting around the fact that you have to learn to read at least some English. Some Japanese developers do write identifiers in Japanese where languages support it, and documentation / comments are often written in Japanese, of course.
I, personally, think this is a lamentable state of affairs that raises the barrier to entry for programming, especially for children. There are education-oriented Japanese programming languages that try to fill the niche for teaching children, but I think it would be beneficial if there were serious languages with a full ecosystem rather than ones designed to be training wheels before learning English programming languages.
how about https://raku.land/zef:l10n/L10N::JA ?
Why not use a pre-processor or something like it to simply translate the keywords etc? I know that there isn’t a 1:1 match between English words and words in other languages, but you should be able to get something close enough.
I actually have done that, but there are still problems. It doesn't really do anything to help somebody who can't read English because things like error messages and libraries are still in English, and it doesn't play nicely with IDE tooling, which is fixable in open-source editors but not proprietary editors. It ends up being a lot of effort for an experience that feels very much second-class.
Nope, they just add huge Chinese comments.
The first STM32 "bluepill"-based SCSI to SD adaptor I ever used had all its source code in Chinese.
Google Translate did a not terrible job of turning all the comments into English but also mangled the code in exciting new ways, but with a bit of ingenuity to apply the Artificial Intelligence translations, and a bit of bloodymindedness when applying the Analogue Idiocy to hacking it all about with search-and-replace, I got a pretty plausible translation of it.
As someone who's spoken English since 5, I'm perplexed by this question. I'm genuinely unfamiliar with any perceived downsides and I would love to hear more of your thoughts
No. You want 'for' to be a looping construct with no other meanings.
Seeing code in my native language makes me laugh, I can't take it seriously.
I strongly disagree. Take, for example...
vs. Even as a low-level programmer, I truly loathe C-style for loops. It takes several seconds to parse them, while the C#-style foreach is instantly grokkable with zero mental overhead. When you're scanning over thousands of lines of codes, the speed and ease of reading constructs like these adds up and makes a huge difference. The desire to apply human-friendly syntax to low-level programming is among the greatest motivating factors for the language I'm working on. All of that being said, I think there is a huge advantage in having code that reads like natural language you understand, rather than having keywords that are foreign and meaningless to you.Coming soon to a programming ecosystem near you:
LLM(eat apples in fruitbasket)
vs
foreach (apple in fruitbasket) apple.Eat()
Your comment can be repeated almost word for word here.
Not at all. I'm comparing two different syntaxes that can reliably compile to the same machine code. A syntax that produces non-deterministic results is a completely different matter.
Ph'nglui mglw'nafh
I was hoping some people would mention other interesting programming languages in this thread, with links.
Da iawn!
whenever you would use 'l', you have to use 'll'?
i'llll get my coat
I know it’s just a joke but the “ll” in Welsh is a completely distinct character in the Welsh alphabet and doesn’t sound anything like “l”, nor is it used as a substitute for l. It’s rarely used but it has its own Middle-Welsh character: ỻ
https://en.wikipedia.org/wiki/Ll
> I know it’s just a joke
Yeah, sorry, I couldn't resist. I'm not Welsh but I lived there when I was a small child, and happily holidayed there after. It is a great country.
429 - Too many requests
[flagged]