Skip to content

Type system

NPL is a compiled, statically checked language. Type annotations are mandatory for all declarations and assignments.

This means the following does not compile, even if nothing in the code ever attempts to access compile() or its invalid path.

function compile(test: Boolean) returns Number {
    return "False"; // Text is not compatible with Number