Type Casting

Paisley does not coerce values to other types, except in the case of conditionals, where types are coerced into booleans. (e.g. in if {123} then ... end, 123 is truthy)

In all other cases, values must be manually cast to different types by the programmer.

Casting to strings

Casting to numbers

Casting to booleans

Other type-casting

Arrays and objects may be cast between each other, but nothing can be cast to an array or object (what would converting a number to an object even mean?). Instead, arrays and objects must be constructed using the supported syntax.