Live data from Hacker News

Show HN: Han – A Korean programming language written in Rust

github.com

31–40 of 131 posts

Re: Show HN: Han – A Korean programming language written in Rust

#32

A simple translation of keywords seems straightforward, I wonder why it's not standard. # def two_sum(arr: list[int], target: int) -> list[int]: 펀크 투섬(아래이: 목록[정수], 타개트: 정수) -> 목록[정수]: # n = len(arr) ㄴ = 길이(아래이) # start, end = 0, n - 1 시작, 끝 = 0, ㄴ - 1 # while start Code would be more compact, allowing things like more descriptive keywords e.g. AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on t…

It's been tried with Chinese Python back in the early 2000s: http://reganmian.net/blog/2008/11/21/chinese-python-translat... It never really took off. I think because computers already require users to read and type Latin letters in lots of other situations, and it's not that hard to learn what a few keywords mean, so you might as well stick with the English keywords everyone else is using.

It might not be hard to learn the keywords in an English programming language but it seems hard to learn something like Spring Boot

Re: Show HN: Han – A Korean programming language written in Rust

#33
When I was studying Computer Science in college, I once remarked how lucky we, English speakers, are that programming languages use English nouns and verbs. A ton of my classmates were here on a student visa, and English was not their first language. I always thought that programming in English put me at an advantage on the learning curve. I also always thought it was silly when someone would quip that programming should count for “foreign language” credit. Anyway, always cool to see non-English programming languages.

Re: Show HN: Han – A Korean programming language written in Rust

#34
I love this. Nice work!

It’s fun to look at your code samples, have absolutely no clue what any of it means, and think about just how many non-English-speaking programmers must have felt that way looking at our all-English programming languages.

Except lisp: that’s just inscrutable symbols like cond and cons and car and cadr and a bunch of parens! :-)

Re: Show HN: Han – A Korean programming language written in Rust

#35
post #20

A simple translation of keywords seems straightforward, I wonder why it's not standard. # def two_sum(arr: list[int], target: int) -> list[int]: 펀크 투섬(아래이: 목록[정수], 타개트: 정수) -> 목록[정수]: # n = len(arr) ㄴ = 길이(아래이) # start, end = 0, n - 1 시작, 끝 = 0, ㄴ - 1 # while start Code would be more compact, allowing things like more descriptive keywords e.g. AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on t…

Good point about compactness — 실명인증계정생성 vs AbstractVerifiedIdentityAccountFactory is a real example where Korean shines. One distinction though: Han uses actual Korean words, not transliterations. 함수 means "function" in Korean, 만약 means "if" — they're real words Korean speakers already know. Your example uses transliterations like 펀크 and 아래이 which would look odd to a Korean reader. That difference matters for readabi…

Using actual Korean words rather than transliterations greatly aids readability --- I can still remember stumbling over the transliteration of "Walker Hotel" when taking Korean at the Presidio of Monterey, and pretty much everyone else had the same problem.

Re: Show HN: Han – A Korean programming language written in Rust

#36
This is indeed a cool project! Happy to see experiments on non-English programming languages. I have one question — not trying to be offensive or doubting, just out of curiosity — does Han make use of the unique properties of Hangul (or Korean in general)? Like, I remember sawing a Turkish programming language on HN the other day, and I might be wrong but my impression was it makes use of some syntax unique to Turkish, and I wonder if Han has similar features. Or, asking it differently, if I replaces only the lexer to another lexer recognizing a different script, will it not work?

Re: Show HN: Han – A Korean programming language written in Rust

#37
post #34

I love this. Nice work! It’s fun to look at your code samples, have absolutely no clue what any of it means, and think about just how many non-English-speaking programmers must have felt that way looking at our all-English programming languages. Except lisp: that’s just inscrutable symbols like cond and cons and car and cadr and a bunch of parens! :-)

The real barrier is not just the language keywords but lots of documentations and discussions in English. I'm not sure whether there is a solution to this.

Re: Show HN: Han – A Korean programming language written in Rust

#38
Have you looked into whether there are any Hanja (Chinese characters) which would be sufficiently expressive to warrant supporting as an alternative way to represent keywords?

Perhaps look to APL for efficient ways to represent math concepts/structures?

Re: Show HN: Han – A Korean programming language written in Rust

#39

A simple translation of keywords seems straightforward, I wonder why it's not standard. # def two_sum(arr: list[int], target: int) -> list[int]: 펀크 투섬(아래이: 목록[정수], 타개트: 정수) -> 목록[정수]: # n = len(arr) ㄴ = 길이(아래이) # start, end = 0, n - 1 시작, 끝 = 0, ㄴ - 1 # while start Code would be more compact, allowing things like more descriptive keywords e.g. AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on t…

Scratch supports Korean, but Scratch benefits from using JSON instead of bytes or code points to serialize programs, which allows the user to change their display language (similar to how hard tabs let users set indentation size).

There's probably a lot of reasons why non English programmers stick with English keywords, beyond just language/tooling support. Learning new keywords is already part of learning a programming language, and much of the documentation and resources available for languages and libraries are only in English. ASCII-only strings are still ubiquitous in software, like URLs and usernames. And in international teams, English is the go-to lingua franca.

Could this change with LLMs? Maybe, but most code in its training data is in English, so LLMs likely work most effectively in English.

Post reply on HN