A few weeks ago I saw a post about someone converting an entire C++ codebase to Rust using AI in under two weeks.
That inspired me — if AI can rewrite a whole language stack that fast, I wanted to try building a programming language from scratch with AI assistance.
I've also been noticing growing global interest in Korean language and culture, and I wondered: what would a programming language look like if every keyword was in Hangul (the Korean writing system)?
Han is the result. It's a statically-typed language written in Rust with a full compiler pipeline (lexer → parser → AST → interpreter + LLVM IR codegen).
It supports arrays, structs with impl blocks, closures, pattern matching, try/catch, file I/O, module imports, a REPL, and a basic LSP server.
This is a side project, not a "you should use this instead of Python" pitch. Feedback on language design, compiler architecture, or the Korean keyword choices is very welcome.
Wonderful! What a cool idea. For anyone interested, you can learn the whole of Hangul in an afternoon; it's cleverly designed to be very logical and has some handy mnemonics: https://korean.stackexchange.com/a/213
Hello, interesting project. I’m a native Korean speaker, so I wanted to share a quick perspective from Korean.
Nouns translate fairly naturally, but standalone verb commands in English need more care. In English, a verb like "find" can stand alone, but in Korean a verb usually needs an ending, and different endings can sound quite different or awkward depending on context. For example, "find" could become 찾다, 찾기, or 찾음, but those are not interchangeable.
Plural forms are also tricky. English distinguishes strongly between singular and plural, but Korean usually does not. Explicit plurals like “단어들” often sound unnatural unless the individuality of each item is important.And it feel same with "단어목록"
Overall, this is a very interesting project with real potential. I think it could become even stronger if it considers the structural differences between English and Korean, rather than treating it as simple keyword substitution.
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.
I don't know Korean but I really appreciate the interesting discussion around linguistics you started here. Some favorite comments that taught me something:
Hangul's phonetic symbolic design: https://news.ycombinator.com/item?id=47382219
Korean plural forms: https://news.ycombinator.com/item?id=47386312
Your comment on how LLM tokenizers shorten common inputs in training data; Korean is more visually compact but suffers from poor token compression: https://news.ycombinator.com/item?id=47381843
Hangul keyboard layout - so cool that the layout is split between consonant and vowel hands and forms rhythmic harmony while typing: https://news.ycombinator.com/item?id=47382081
I think is a dumb idea. Historically has been easy to learn programming languages because everyone uses the same things, no fragmention. If now everyone starts creating their own programming languages with different language everything is fragmented, you would to a company, and in the interview they will require you to know korean to work there, they will not be able to hire contractors, you will not be able to see an article about a nice feature on another programming language, and port it...
I suppose is again why I discuss with everyone as I would like to have a single language in the world, it would reduce wars, miscommunications, bound everyone closer. But ofc, the other point of view is that it reduces culture But I think it would happen as UK/US or Spanish, same language with variations, but everyone can understand each other.
I can't imagine what would have happened if Python or JS had been fragmented into X different languages because of egos, and instead of collaborating, decide each to create their own languages. I don't think we would be where we are today, probably AIs would not be around, since we would be fighting to understand so many different programming languages.
Cool project! I went to a Korean university more than 190 years ago and can only speak basic Korean but going through your examples seem to be improving my Korean vocabulary!
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 < end:
동안 시작 < 끝:
Code would be more compact, allowing things like more descriptive keywords e.g.
AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on the nice upper/lowercase distinction.I hear that information processing speed is nearly the same across all languages though regardless of density, so in terms of processing speed, may not make much difference.
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! :-)
It reminds me of the Easy Programming Language(https://en.wikipedia.org/wiki/Easy_Programming_Language), a Chinese programming language. Many kids in China started learning programming with it about 15 years ago.
I don't know Korean at all, but this looks cool and a fun project. I'm curious if this reduces typing or has any benefits being in Hangul vs Latin?
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?
This looks like quite an intriguing project. I think it would be even more compelling if it featured a JS live compiler for immediate browser execution.
Have you considered rotating the layout? I always though a CJK programming language written vertically would be very ergonomic. Instead of scrolling vertically the program would flow right-to-left or left-to-right. I guess you'd probably want to rotate the bracket/paran glyphs which is a bit less trivial to do
@apt-apt-apt-apt pointed out in a separate comment that: >A simple translation of keywords seems straightforward, I wonder why it's not standard.
I replied that for Japanese at least, probably due to symbol input being too tedious. However I think it's worth mentioning a potential mitigation, and maybe even an advantage.
As a mitigation, full-width symbols could be used instead, which are typically the default in Japanese input. Japanese itself is also fixed-width so if done across the board the language itself becomes fixed-width, not just by virtue of a font selection.
As an advantage, some logical symbols, greek letters, other rare characters are easy to input in Japanese mode, and this could lend itself to a more symbol-heavy language design. I already take advantage of this myself with Δ, φ, and τ use selectively in a few projects. Symbols with easy entry may differ by OS, but here are a few other examples that could be useful:
≠, ≡, ∞, ∴, λ, θ, α, β, ・, °, ※
fun fact, you can easily write c in any language you want through the power of macros
https://github.com/farant/rhubarb/blob/main/include/latina.h
edit: oh, maybe you can’t do full unicode. that’s too bad!
Great work! I still remember my high school IT class, where teachers were using multiple languages to explain the functionality of different 'modules' in programming language (it was still python 2.x back then), and by that time I was trying to do a 'multilingual' programming language (tbh it was just changing variables into different languages), and now 10 years have passed, and the dream is finally catching up with me.
why ruin a beautiful language like korean with an awful language like rust?
I know this is mostly about keyword substitution but it still tickles me that you still write f(x) in this language and not (x)f given that Korean is SOV but I guess that's just how you notate that no matter what cultural context you're in. Hadn't ever considered that the convention of writing a function before its arguments might have been a contingency of this notation being developed by speakers of SVO languages.
i only code in this when no ones around. one might say I...han solo
Really cool to see more developer tools built in Rust. I've been using Rust for a desktop app backend (Tauri v2) and the performance difference vs Electron is night and day — native memory usage, instant startup. Curious what the compile times look like for Han compared to rustc itself.
Curious about the name — if the language uses Korean (Hangul) keywords, why call it “Han”? In Latin letters that usually reads like the Chinese 汉 (Han) / pinyin rather than Korean. Is there a specific reason for that choice?
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?
So... iirc Korean words are constructed out of symbols, would it be possible to mutate the meaning of keywords by giving the symbols meaning and constructing new blocks of symbols?
This is an interesting approach. Using Korean identifiers gives the code a very distinctive look and makes the project stand out. However, from a collaboration perspective it might reduce readability for contributors who are not familiar with Korean.
Great project. As a Korean CS student I always wished Korean had more presence in dev tooling. Nice to see this getting traction on HN.
I'd imagine that a transpiler for Perl with this idea would make one-liners even more potent.
I wonder why there are not more programming languages not only with non-English keywords, but with different grammars. For example, if X then Y and many other constructions closely follow English grammar, but when you study other languages you quickly become away of many other possible constructions.
The name reminds me of the character Han from Broken Sisters.
It's been a long time since I've seen a properly implemented Korean programming language
My dream is to one day make a chaldean programming language for my kids. Stuff like this is inspiring
Wow this is the Choson language
The name is interesting, it is just like some aussies creating a new language calling it Anglo.
I’ve always wondered why there weren’t more non-english charactered programming languages but I can only assume it was just inertia
This seems like a reasonably good security measure too
I’ve always wondered why there weren’t more non-english charactered programming languages but I can only assume it was just inertia
NK Emperor Kim King Dong * ,thanks you, and may have a job offer!
* , realy hope this isn't unforgiveably offensive.
Imagine if you had to work with a Korean company using this
Amazing though!
[flagged]
[dead]
[dead]
[dead]
[dead]
good job!
[dead]
[dead]
Great work :) If you're interested in Korean programming languages, there's a functional one called 'Nuri': https://github.com/suhdonghwi/nuri/
Rather than just translating keywords, it lets you write code that actually uses Korean grammar. For example, "10을 5로 나누고 출력하다" (literally "10 by 5 divide and print") outputs "2".
You might already know this, but there's also a Korean programming language called 'Yaksok'. Here's a 2048 written entirely in Korean: https://github.com/yaksok/yaksok/blob/master/code_examples/2...