Standard Library
println
Section titled “println”Prints a value followed by a newline.
println("hello") // prints a stringprintln(42) // prints an integerprintln(true) // prints a booleanprintln() // prints a blank lineBackend implementation
Section titled “Backend implementation”| Target | String | Int | Boolean |
|---|---|---|---|
| JVM | System.out.println(String) | System.out.println(int) | System.out.println(boolean) |
| DEX | Ljava/io/PrintStream;->println(Ljava/lang/String;)V | via toString + println | via toString + println |
| LLVM IR | puts(str) | printf("%d\n", val) | conditional puts("true")/puts("false") |
Not yet available
Section titled “Not yet available”The following standard library features are not yet implemented:
| Feature | Blocked on |
|---|---|
print() (no newline) | Straightforward to add |
readLine() | I/O beyond println |
listOf, mutableListOf | Generics, classes |
map, filter, fold | Lambdas, generics |
to (Pair creation) | Classes |
require, check | Exception handling |
String.length, .substring() | Method calls on classes |
Int.toString() | Method calls on primitives |
Math functions (abs, max, min) | Standard library binding |