Han (한) Programming Language
Han is a statically-typed, compiled programming language where every keyword is written in Korean (Hangul). It compiles to native binaries through LLVM IR and includes a tree-walking interpreter for instant execution.
Quick Example
함수 인사(이름: 문자열) {
출력("${이름}님 안녕하세요")
}
인사("세계")
Output: 세계님 안녕하세요
Key Features
- Korean keywords —
함수,만약,이면,반복,변수 - Korean word order —
만약 조건 이면 { },조건 동안 { } - String interpolation —
"${expr}"auto-desugars to형식() - Korean logical operators —
그리고,또는 - Dual execution — interpreter (
hgl interpret) and compiler (hgl build) - Tooling —
hgl check,hgl init, VS Code extension, and LSP support - Learning path —
examples/교육_*.hglincludes 10 SOV-first educational programs - Arrays, structs, enums, tuples, closures, pattern matching
- Error handling —
시도/처리with Elm-style source-context errors - File I/O, format strings, module imports
How It Works
Source (.hgl) → Lexer → Parser → AST → Interpreter (direct execution)
→ CodeGen → LLVM IR → clang → Binary