Language tour
New here?
Learn Mini is the step-by-step tutorial with exercises. This tour is the reference listing of the same features.
Mini is Kotlin, so this tour is short on explanation and long on programs. Every listing here is a real file under website/samples/tour/, and every one has a Run button: it compiles and runs in your browser. CI builds each one with ./minic build, runs it and compares stdout with the output shown beneath it.
Build and run any of them yourself:
sh
./minic build website/samples/tour/basics.kt -o build/basics && ./build/basics| Page | Features |
|---|---|
| Basics | functions, default and named arguments, when, ranges, loops, labels, templates |
| Classes and interfaces | constructors, properties, inheritance, interfaces, companion object, object |
| Data, enum and sealed | data class, enum class, sealed hierarchies, exhaustive when |
| Generics | generic classes and functions, bounds, reified |
| Lambdas and inline | closures, function references, inline, scope functions |
| Exceptions | try/catch/finally, custom exceptions, runtime failures |
| Extensions and null safety | extension functions and properties, ?., ?:, smart casts, lazy |
| Collections and strings | the stdlib: lists, maps, sets, StringBuilder |
For what does not work, see Mini and Kotlin/JVM. For the memory features that Kotlin does not have, continue with the memory guide.