You can imagine my pain when back in school they made us use some shitty CASE software (Computer-aided software engineering) that uses its own language that lets you code either in french or english, or both at the same time if you want to. And they also have a chinese version.
We do code reviews as a service, and have so often encountered French, Dutch and German variable names, documentation/comments, method names, etc. The whole idea that maintenance of the code might some day be outsourced to someone non-native often does not occur
Because why would you ever? That seems like such a fucking headache writing a compiler, and syntex tree parser for a foreign langauge... if I was asked to program that, I'd probably leave the industry
...What? Why would you need to write a custom compiler? The picture clearly shows a program written in standard Python. They've just chosen to write the variable names in Japanese, which is perfectly allowed. Variable names are just text; the compiler doesn't have to learn to speak Japanese, any more than it knows how to speak English.
Someone on the Python Discord wrote something to mangle source code (basically translating characters using these) and it was horrible. The code still ran fine though.
There's less room for jank there than you might think. Python normalizes variable names, so as far as it's concerned 𝓷𝕦𝘮𝖇ℯ𝚛, 𝓃𝔲𝕞𝚋ⅇ𝓻, and number all refer to the same variable.
This is one of the things they did. It was one of the staff members or something on the Python Discord (I don't remember their name and I don't hang out there anymore). I remember that we were having a pretty hoity-toity conversation about unit testing and the Python AST among other things then we started talking nonsense like this.
Writing a language in a different language is just as easy/hard as writing an English based language. The problem is just that this language would not be very used or liked and that's for a good reason. English is the way to go in programming, always.
View all comments
595
u/delta-samurai Aug 27 '21
This is the first piece code I've ever seen in another language