Live data from Hacker News

Non-English-based programming languages

en.wikipedia.org

61–70 of 81 posts

Re: Non-English-based programming languages

#61

I ended up on the (Chinese-language) page for 丙正正¹, a Chinese C++ variant. There was a code example, which I ran through Google Translate to see what would happen. The result is surprisingly readable (and obviously a C-family language)²: Empty chess file :: set comments (character * s, integer n) { If (n> = maximum number of comments) For (; maximum number of annotations ¹ http://zh.wikipedia.org/wiki/%E4%B8%99%E6%AD…

Now that's just fucking horrifying. D: I have a translation of "Design of the Unix Operating System" in Chinese, and take great comfort in the fact that I can still get the gist of all the source code listings--even despite the comments in Chinese. I admire the simplicity of the grammar in Chinese (from the year I took of it in college), but honestly I find logographic languages are kind of gross. EDIT: Fine, fine, I…

Chinese characters (and similar writing systems) do have certain advantages versus alphabetic systems though. The smallest unit of writing has more information embedded in it. You've got a decent chance of guessing the meaning of a compound word if you know some of the characters in it, though not necessarily the pronunciation. With alphabets, it's reversed, if you know all of the pieces of a word, pronunciation is usually simple, but meaning not necessarily so (especially in English). As a result, the written language is more dense, and can actually be read more quickly.

Finally, with an appropriate method, it doesn't have to take years to learn enough characters to write and read literately, I can read Japanese at a high school level, and I've been at it for a year and a half.

Re: Non-English-based programming languages

#62

Earlier quoted context omitted.

Yeah, okay: http://en.wikipedia.org/wiki/APL_%28programming_language%29

Yeah, the problems there are that the symbols don't have easy to remember names, and that they can't be typed in a normal environment. Multi-character ascii symbols would be a lot more accessible.

J seemed to be a good step in that direction.

Re: Non-English-based programming languages

#63
post #16

Create a non-English based programming language is very different from translating a english programming language. Different languages have different ways to express time, state, etc. If one translates a english programming language, it will be a translated English based programming language (not a Non-English base...) I`m a native portuguese speaker, for example. In portuguese, we "break" the "to be" verb in two for…

As another Portuguese speaker, I don't think that "ser" is all that immutable; it describes plenty of non-intrinsic and/or immutable properties. In fact, the verb is used extremely often in the past tense, which shows that in Portuguese the objects often change what they "are".

Re: Non-English-based programming languages

#64

Earlier quoted context omitted.

For things like "while", "do", "return", "public", "private" I definitely think of it as "real English text". For things like "for", "wend" (while-end), "class", "switch", "main", they're divorced enough from any real English meaning that I just think of them as arbitrary coding words. So, it's kind of both, at least for me.

esac anyone? :P

fi

Re: Non-English-based programming languages

#65
post #61

Earlier quoted context omitted.

Now that's just fucking horrifying. D: I have a translation of "Design of the Unix Operating System" in Chinese, and take great comfort in the fact that I can still get the gist of all the source code listings--even despite the comments in Chinese. I admire the simplicity of the grammar in Chinese (from the year I took of it in college), but honestly I find logographic languages are kind of gross. EDIT: Fine, fine, I…

Chinese characters (and similar writing systems) do have certain advantages versus alphabetic systems though. The smallest unit of writing has more information embedded in it. You've got a decent chance of guessing the meaning of a compound word if you know some of the characters in it, though not necessarily the pronunciation. With alphabets, it's reversed, if you know all of the pieces of a word, pronunciation is u…

So, Japanese is a uniquely bad example here, right?

As I understand it, there are three alphabets: kanji (lots of Chinese characters), katakana, and hiragana. The latter two are used to spell out the syllables of words, in some sense acting like an alphabetic language. Kanji seems to have a thousand or two characters in use, whereas katakana and hiragana have around fifty.

Beyond looking up stroke numbers and radicals, I found dictionary usage for Chinese characters somewhat hard--English lets you basically do a very easy binary search on a word (start at most significant character, find section, move to next most significant character, etc.).

Re: Non-English-based programming languages

#66
post #19

An ambition of mine is a programming language where the program structure is decoupled from its visual/textual appearance (model-view separation). One nice result of this scheme is, for example, you could work on a program in English and another person could collaborate on the exact same source in French. Although I suspect that if this did get written and translated around a lot, many non-English speakers would stil…

How would that work for human-defined names? The second programmer would see a jumble of words in different languages (e.g., keywords in native language, variables and function names in the original). Even if they could be translated, that would still require the programmer to perfectly understand them in the first place, and then, why bother wasting the time to translate?

Frankly, as a non-native speaker, I absolutely dread localized source.

Re: Non-English-based programming languages

#67
post #19

An ambition of mine is a programming language where the program structure is decoupled from its visual/textual appearance (model-view separation). One nice result of this scheme is, for example, you could work on a program in English and another person could collaborate on the exact same source in French. Although I suspect that if this did get written and translated around a lot, many non-English speakers would stil…

AppleScript works like this. When you save a script it's compiled down to a system representation, and when you reopen it it's transformed back into the english script language. This means: * Formatting isn't preserved and the file is retabbed each time you save it. * Earlier versions had French and Japanese compilers/decompilers * Each application can add AppleScript syntax (like VBA/OLE or whatever). If a script us…

TI-Basic 68k (the one used on the TI-89, TI-92, and Voyage 200 series calculators) also does this, except formatting is preserved.

It also uses the same file type for tokenized and untokenized programs: untokenized programs are tokenized when run, and tokenized programs are untokenized when opened with the built-in text editor. Short of opening the file with some external program like a hex editor, there's no way to tell whether the program is tokenized or not. Which, of course, can cause problems if you send an untokenized program to a calculator set to a different language.

Re: Non-English-based programming languages

#68
post #61

Earlier quoted context omitted.

Chinese characters (and similar writing systems) do have certain advantages versus alphabetic systems though. The smallest unit of writing has more information embedded in it. You've got a decent chance of guessing the meaning of a compound word if you know some of the characters in it, though not necessarily the pronunciation. With alphabets, it's reversed, if you know all of the pieces of a word, pronunciation is u…

So, Japanese is a uniquely bad example here, right? As I understand it, there are three alphabets: kanji (lots of Chinese characters), katakana, and hiragana. The latter two are used to spell out the syllables of words, in some sense acting like an alphabetic language. Kanji seems to have a thousand or two characters in use, whereas katakana and hiragana have around fifty. Beyond looking up stroke numbers and radical…

Bad in what way exactly? Hiragana and Katakana are easier to pick up, because there is more burden placed in learning each individual word. With the baseline investment to learn the Kanji in place, each new word is just a composition of characters and their associated ideas that you already know.

You can do the same thing with dictionaries in Japanese or Chinese, though it works best if you use a dictionary that lets you handwrite in the characters (it helps a lot if you learn your radicals and stroke orders well, so that you can easily write characters you don't know).

Re: Non-English-based programming languages

#69
post #68

Earlier quoted context omitted.

So, Japanese is a uniquely bad example here, right? As I understand it, there are three alphabets: kanji (lots of Chinese characters), katakana, and hiragana. The latter two are used to spell out the syllables of words, in some sense acting like an alphabetic language. Kanji seems to have a thousand or two characters in use, whereas katakana and hiragana have around fifty. Beyond looking up stroke numbers and radical…

Bad in what way exactly? Hiragana and Katakana are easier to pick up, because there is more burden placed in learning each individual word. With the baseline investment to learn the Kanji in place, each new word is just a composition of characters and their associated ideas that you already know. You can do the same thing with dictionaries in Japanese or Chinese, though it works best if you use a dictionary that lets…

Oh, so, my point was that using Japanese was a bad example, precisely because two of the three alphabets are used nonlogographically. It is also my understanding that new words and loanwords are spelled out phonetically in those alphabets, instead of grafting some new character into the kanji.

"if you use a dictionary that lets you handwrite in the character"

I'm unfamiliar with any paper dictionary with that capability.

Post reply on HN