// Actual generics & sum types
fun find_person(Int person_id) -> Result[String, String] {
// Easy, explicit error bubbling
try Person::find_by_id(person_id)
}
val id = POST::get("person_id") ?? exit("Null person_id")
// Errors as values
val person = try find_person(person_id: id) with error {
eprint("Error: {error}")
exit("Person not found")
}
// First class HTML-like templates & components
print(
<a href="/person/reports/{person.id}">
welcome, {person.name}
</a>
)
// And more!