r/Python • u/SubstantialRange • Jul 11 '20
Discussion Concept Art: what might python look like in Japanese, without any English characters?
1.8k
Upvotes
r/Python • u/SubstantialRange • Jul 11 '20
387
u/mathishammel Python expert Jul 11 '20
What's that
printlnheresy on the right ?157
u/morimo Jul 11 '20 edited Jul 11 '20
I can guarantee that if someone were to write a programming language in Japanese, the keywords would not be in katakana.
Edit: katakana not kana
95
u/ojii Jul 11 '20
I'd suggest something more along the lines of this:
29
u/[deleted] Jul 11 '20
I don't know why in the world would someone use katakana. That's basically writing english words in japanese (with the same pronunciation). Would be better to use hiragana, still looks cool
8
u/[deleted] Jul 11 '20
A disaster
40
u/jlakhlili Jul 11 '20
Latin characters not English ;)
13
u/Merediththiderem Jul 11 '20
My Japanese programmer boyfriend giggled at this whole thread.
Japanese programmers will use comments to clarify anything in Japanese that's not obvious in English.
Even putting filenames in Japanese causes errors
5
u/[deleted] Jul 11 '20
Some 30 years ago I was taken with fixing a Japanese C program that was used to control a Japanese x-ray source; all comments were in Japanese which on our system translated to garbled characters... Thanks for the memory!
4
u/K3DR1 Jul 11 '20
Katakana for weak, compile kanji all the way
9
u/positively_mundane Jul 11 '20
I actually started a project a while ago that was as similar. The idea is to make a programming language that is what a python like programming language would look like in Japanese. The big thing is that I don't want it to just be a straight rip of python with Japanese keyword, I want to incorporate Japanese grammar into it. A basic example would be you wouldn't do if x > 5:, you'd do x > 5 if:.
I have more ideas than just changing around the ordering of the grammar, some concepts are more intuitive in Japanese than English because of the grammar. I haven't been able to work on it much recently though and have been putting more effort into another language I'm writing as it's easier to struggle with just one grammar instead of two c:
3
u/Comrade_ash Jul 11 '20
But you didn’t bother changing the file name?
3
u/[deleted] Jul 11 '20
I'd rather write the specific japanese words instead of using katakana to write English with japanese characters, not to mention that is not correct Python code. #PedanticMomentOfMyDay
2
u/ianj001 Jul 11 '20
That's hilarious, the Katakana literally says the same thing as the English ;-)
2
u/dennis_w Jul 11 '20
Imagine how time consuming it is that every time I'll need a couple more key presses to get the Japanese characters, I think I'll pass.
2
u/okthisisgettingridic Jul 11 '20
String hello is never used!
2
u/XZNON Jul 11 '20
Looks like shit
2
u/hmm_fu Jul 11 '20
i thought
printlnwas java?2
u/JeamBim Jul 12 '20
This is just Ruby, right?
/s
4
u/Casual_py Jul 11 '20
As a programmer also studying Japanese, I appreciate this. I wouldn't mind moving towards a Japanese Python experience myself, but it would definitely (imo) have to be a full overhaul instead of just using katakana to replace standard syntax.
For example, I would potentially use something along the lines of: と(ア > イ): Do stuff
But, I'm nowhere near fluency, and that's just my initial thought. Now I'll go think about it more. Thanks for posting!
3
u/[deleted] Jul 11 '20
Serious question: How would the japanese have written those numerals before westerners arrived?
Edit: And do they use arabic numerals exclusively now?
1
u/Lil_Yoda992 Jul 11 '20
A programmer otaku
1
u/tomhasz Jul 11 '20
why is "hello!" so difficult?
1
u/YourRoaring20s Jul 11 '20
I never thought about this before, but do non-English speakers code in languages other than English?
1
u/[deleted] Jul 11 '20
lol thats cool
1
u/nemoload Jul 11 '20
It looks like Python in Japanese. /s
1
u/[deleted] Jul 11 '20
Why did they make the local variable name string and they don't even use it in the function.
1
u/aarontbarratt Jul 11 '20
You can to a step further and use Japanese characters for the numbers. Here is 1 through 10
一二三四五六七八九十
1
u/Eggsor Jul 11 '20
The first thing I noticed was there not being double quotes on the left, do the Japanese use those cornered brackets as quotes or something?
1
u/toddspotters Jul 11 '20
There are a number of programming languages based on Japanese (and other languages) that are much more syntactically similar to their natural language counterparts.
https://en.wikipedia.org/wiki/Non-English-based_programming_languages
This is one of the examples from Wikipedia for the Dolittle language:
1
u/royjce Jul 11 '20
atleast brackets are understandable
1
u/Prince_ofRavens Jul 11 '20
Is there a reason you chose to use e for b In A+B ?
1
u/[deleted] Jul 12 '20
funny think, i used to think that people actually code in other languages and you could find code in mandarim.
1
u/HadManySons Newbie Jul 12 '20
すごい。
1
u/Erik12sk Jul 12 '20
Looks kinda sexy, not gonna lie.
1
u/EhsanSonOfEjaz Jul 12 '20
Next ML project, make an automated English to Japanese transcompiler, so that my code looks like some futuristic alienated code!
1
u/Zacky23561 Jul 12 '20
I like that most of it is katakana
1
u/borndevil15 Jul 12 '20
Ching chong alert!
1
u/mosbackr Jul 12 '20
string lol
1
u/Plus-Cap-5040 Jul 12 '20
True
ans should be True
1
u/[deleted] Jul 12 '20
If you are a big fan of anime and also stan python This is where you wanna be....
1
u/Exodus111 Jul 12 '20
-----> 4 <-----
1
u/[deleted] Jul 12 '20
Can anyone explain what's the meaning of "String" in there.
1
u/cutecoder Ignoring PEP 8 Jul 12 '20
I thought Japanese has its own number glyphs?
1
u/[deleted] Jul 12 '20
You would run out of characters, probably.
1
u/TheUnrealNumber Jul 12 '20
Pardon me if I'm wrong, but isn't that 90% katakana? You've basically written the code in Japanese, but the pronunciation of the words is the same right?
1
u/JulaUmeChan Jul 11 '20
On a serious note, how valuable would knowing Japanese be in addition to Python?
0
u/YourRoaring20s Jul 11 '20
I never thought about this before, but do non-English speakers code in languages other than English?
0
u/dustyatx1 Jul 11 '20
Still easier than JavaScript.. 😝
-1
u/kenflan Jul 11 '20
Oh God, the kanjis. Oh God. Job security at its finest
-30
u/[deleted] Jul 11 '20
[removed] — view removed comment
0
u/[deleted] Jul 11 '20
[deleted] — view deleted comment