Klyn is a statically typed language designed to keep source code compact without sacrificing explicit structure, predictable typing, or fast execution. This documentation is split in two: a serious tutorial for learning the language, and an API reference for exploring the standard library in detail.
Start here if you want to learn Klyn syntax, typing rules, control flow, classes, generics, exceptions, and the standard collection literals in a coherent order.
Browse the generated reference for packages, types, members, and examples from the standard library. Use this once you know the language basics and need precise library details.
If you already know typed languages, jump straight to the first runnable Klyn script and the execution model.
const LIMIT as Int = 5
def describe(value as Int) as String:
return "small" if value < LIMIT else "large"
class Counter:
public property current as Int = 0
public tick() as Void:
this.current++
counter = Counter()
while counter.current < LIMIT:
counter.tick()
print(describe(counter.current))
klyn package is imported by default. Other packages or qualified types must be imported explicitly.: and use spaces for indentation. Tabs are rejected.Start with Getting Started, Lexical Structure, and Packages and Imports, then Coding Conventions.
Learn Typing, Expressions, Statements, and Functions.
Continue with Classes, Properties, Inheritance, Generics, and Exceptions.
Finish with SQL Database Access, ORM and Entities, and Reflection.