Type checking

Gleam has a robust static type system that helps you as you write and edit code, catching mistakes and showing you where to make changes.

Uncomment the line io.println(4) and see how a compile time error is reported as the io.println function only works with strings, not ints.

To fix the code change the code to call the io.debug function instead, as it will print a value of any type.

Gleam has no null, no implicit conversions, no exceptions, and always performs full type checking. If the code compiles you can be reasonably confident it does not have any inconsistencies that may cause bugs or crashes.