Misuse-Resistant Language Design

Several of Monte’s design decisions are based on the concept of misuse-resistant tools which are designed to frustrate attempts to write faulty code, whether accidentally or intentionally.

Unicode Identifers

Monte has Unicode identifiers, like many contemporary languages. However, Monte generally rejects bare identifiers which other languages would accept. Instead, we require arbitrary Unicode identifiers to be wrapped with a slight decoration which serves as warning plumage.

Here are the examples from Unicode TR39 as valid Monte identifiers:


None of these examples are valid bare identifiers in Monte.

Other Languages

Haskell has had Unicode identifiers since Haskell 98. Haskell support for Unicode identifiers is detailed in the Haskell 98 Report Lexical Structure. Haskell accepts “pаypаl” as a bare identifier for names.

Python 3 added Unicode identifiers in PEP 3131. Python 3 accepts “pаypаl” as a bare identifier for names and attributes.

Parenthesized Sub-Expressions

Whenever an expression is syntactically contained within another expression, it must be parenthesized, with the sole exception of common guard-exprs used in patterns. This feature, explained in more detail in The Power of Irrelevance, improves readability by clearly distinguishing patterns from expressions.