Useful features
- A lot less boilerplate than Java
data classes – basically custom tuples. Allows convenient destructuring declarations too.- Has access to the data structures in the Java standard library (
TreeMap,HashMap,PriorityQueueetc.), and also can useBigIntegerandBigDecimalif needed - Functional idioms for collection manipulation;
map,fold,filter, etc. inline classes – allows the creation of a new type that wraps over a base type, but that is represented by an underlying type at runtime. Especially useful for "modulo $$$10^9 + 7$$$" problems, as I keep aModInttemplate that overloads the arithmetic operators appropriately, but is represented as a plainintin JVM runtimerunfunction – great way to write code that needs to shortcut (return@run "NO") without having to write a new function and pass every relevant argument- functions in functions – functions can be defined within e.g. the
mainfunction, so again, no having to pass lots of arguments or global variables



