Strongly-typed word definitions

The Factor compiler supports advanced compiler optimizations that take advantage of the type information it can glean from source code. The typed vocabulary provides syntax that allows words to provide checked type information about their inputs and outputs and improve the performance of compiled code.

Parameters and return values of typed words where the type is declared to be a final tuple class with all slots read-only are passed by value.


Defining typed words at run time:
define-typed ( word def effect -- )

input-mismatch-error ( value expected-type word expected-types -- * )

output-mismatch-error ( value expected-type word expected-types -- * )