pertype
Pertype is a term used in discussions of type systems to denote data types that carry per-instance metadata governing allowed operations. The concept aims to express fine-grained capabilities alongside data values, enabling policy enforcement at either compile time or runtime. The term is not canonical and appears in various design notes and speculative proposals rather than in standardized language specifications.
A pertype consists of a base type T and a per-element policy P that maps each value
File handle pertype: a file handle value includes metadata specifying read or write permissions, constraining which
Policies can be static (checked at compile time) or dynamic (checked at runtime). Policies may be monotonic
Pertypes relate to capability-based security, effect systems, and dependent types. They differ by attaching operational permissions
In programming languages, pertypes can be realized through dependent types, phantom types, or capability-safe abstractions. Enforcement
The term remains a proposal concept rather than a widely adopted standard. Its utility lies in modeling