의도를 담는 작고 닫힌 언어. 사람이 쓰고, 에이전트가 쓰고, 툴체인이 검증한다.
오늘 실행된다. 출력은 툴체인에서 캡처했다.
function clean(words: Array<string>) -> Array<string> {
return filter(words, (w: string) => w != "")
}
function shout(words: Array<string>) -> Array<string> {
return map(words, (w: string) => w + "!")
}
let line = ["one", "", "way", "", "to", "say", "it"]
|> clean
|> shout
print("{line}")[one!, way!, to!, say!, it!]
말하는 방법은 하나. 정책은 언어가 결정한다.
도메인 언어가 그대로 코드가 된다. 한글, 키릴, 이모지가 1급.
작은 명세, 기계 검사 가능한 프로파일, 파서로 검증되는 문서.
sql, sh, 경로 템플릿. 안전이 규율이 아니라 문법이 된다.
사람이 읽는 명세. 실제로 실행되는 오라클. CI에서 백엔드와 맞춰지는 기준점.
Topaz는 애플리케이션 의도를 위한 작고 닫힌 Unicode-first 언어입니다. 사람과 에이전트가 같은 표면을 쓰고, 툴체인이 검사하고 기준으로 실행하며, 그 기준을 Rust와 Python 백엔드와 측정된 표면에서 바이트 단위로 비교합니다.
철학 읽기 →function discount(customer: { tier: string, years: int }) -> float {
return match customer {
case { tier: "vip", years } if years > 5 => 0.3
case { tier: "vip" } => 0.2
case { years } if years > 1 => 0.1
case _ => 0.0
}
}
print("{discount({ tier: "vip", years: 7 })}")
print("{discount({ tier: "new", years: 0 })}")0.3 0.0
let result = concurrent {
answer: 6 * 7
status: "ready"
}
defer print("cleaned up")
print("{result.answer} {result.status}")42 ready cleaned up
function fibonacci(n: int) -> int {
return match n {
case 0 => 0
case 1 => 1
case _ => fibonacci(n - 1) + fibonacci(n - 2)
}
}
let series = map(0..<10, fibonacci)
print("{series}")[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
function clean(words: Array<string>) -> Array<string> {
return filter(words, (w: string) => w != "")
}
function shout(words: Array<string>) -> Array<string> {
return map(words, (w: string) => w + "!")
}
let line = ["one", "", "way", "", "to", "say", "it"]
|> clean
|> shout
print("{line}")[one!, way!, to!, say!, it!]
function 인사하기(이름: string) -> string {
return "안녕하세요, {이름}님!"
}
print(인사하기("토파즈"))안녕하세요, 토파즈님!
function greet(name: string) -> string {
return "Hello, {name}!"
}
print(greet("Topaz"))Hello, Topaz!
function привет(имя: string) -> string {
return "Привет, {имя}!"
}
print(привет("Топаз"))Привет, Топаз!
의도는 당신이 쓰고, 컴파일러는 Rust와 Python을 만든다.
사용 가능 — 사이트 샘플 530개 파스 검증
사용 가능 — 멀티 파일 유닛
사용 가능 — 이 페이지의 모든 프로그램 실행, 출력 고정
사용 가능 — Rust로 방출, 인터프리터와 차등 테스트 완료
사용 가능 — Python으로 방출, 측정 스위프의 조용한 불일치 0건
사용 가능 — 망라적 match를 갖춘 명목 닫힌 합