print

use Core.print

The print core module provides several print functions. Here are all the print functions this module provides. There exist a lot of builtin print overloads for the print function.

Parameter TypesReturn TypesPossible Errors
strvoidNo
i32voidNo
i64voidNo
u32voidNo
u64voidNo
f32voidNo
f64voidNo
u8voidNo
boolvoidNo

Note that none of the print functions prints a new line after the print. This could be important when printing values in a loop, for example, because calling a "native" print function like print(i32) is generally speaking faster than calling the print(str) function with an interpolated string as argument, as string casting + concatenation takes more time than just calling the specialized print functions one after another. So, while string interpolation is much more ergonomic for the programmer, its is also a bit slower generally speaking.

The print(str) function was used throughout this wiki until now. Every string interpolation evaluates to a string value, so this is the function we have called exclusively thus far, to make printing not as overwhelming.