Kalinga
A small, safe, object-oriented language. Classes and clear errors on top, the speed of Rust underneath, and the web when you want it.
class Greeter {
name: str
init(name: str) {
self.name = name
}
fn greet() -> str {
return "Hello, " + self.name + "!"
}
}
fn main() {
g = Greeter("Kalinga")
println(g.greet())
}Classes you already know
Classes with init, inheritance with override, interfaces with default methods, generics with bounds, enums with exhaustive match.
No null, no exceptions
A missing value is T? and must be checked; failure is Result with ?. Integer overflow and bad indexes stop the program with a clear message.
Native, through Rust
Programs compile to Rust and then to a fast native executable, with Rust crates and inline Rust when you need them.
The web, through JavaScript
kalinga build --web makes a page; std/web and std/reactive update exactly the parts that change.
Errors that help
Every error says what is wrong and how to fix it, with did you mean for misspelt names, and kalinga fix updates code for new versions.
Tools included
kalinga fmt, kalinga test, the utkal package manager and a VS Code extension with completion, hover and rename.
Try it
kalinga run greeter.kl
utkal new hello
utkal new site --web && cd site && utkal serve