A long, long time from now, in the wake of what will no longer be called JavaScript, might be going to have existed a programming language called kesh.
kesh is a simple high-level programming language. Its syntax is a superset of na.
kesh 2021
-- prototype
#person: [ -- type definition
name: #text -- type annotation
age: #number
speak(): "Hi, I'm { this.name }." -- literal method (type inference)
]
-- instance
joe: #person [ -- new collection that delegates to #person
name: 'Joe'
age: 27
]
-- function
greet: ([name, age]: #person) -> { -- typed function (argument unpacking)
name: name if age > 12 else 'kid' -- block-scoped declaration (param masking)
"Hey, { name }!" -- the last evaluated expression is returned
}
joe.speak() --> "Hi, I'm Joe."
greet joe --> "Hey, Joe!"
Nothing is written in stone. Feedback and contributions are always welcome!
heyiya-if symbol is CC0. Original by Margaret Chodos-Irvine for Ursula Le Guin's novel about the Kesh, Always Coming Home.