Typelocality
Typelocality is a term used in discussions of programming language design and software architecture to describe how localized type information is within a software system. It refers to the extent to which a type is confined to a particular module, package, or lexical scope rather than being globally visible across the program. High typelocality means that most types are defined and used within well-defined boundaries, with explicit exports or interfaces that restrict access to internal representations. Low typelocality corresponds to broader visibility, where types propagate through interfaces or type inference across modules.
In practice typelocality is achieved through module systems, access modifiers, and opaque or abstract data types.
Typelocality interacts with type inference and polymorphism. Strong locality may require explicit type exports, while type
In related terminology, typelocality is often discussed alongside encapsulation, interface design, and the module system of