#### Types, Kinds, Classes, hinting
- Types may affect different layers of data flow. The economics of
type systems ( policy design and enforcement ) comes down to the
trade-off between PREEMPTIVE and AD HOC checks.
- Lexing : Lexical layer : specific graphemes may indicate tokens which are
about the type system.
- Parsing of semantics : Abstract syntax layer(s) : Tokens may indicate
1. that specific data is of a specific type,
2. that specific types are related in certain ways, or
3. that specific types are required, allowed, or prohibited,
from any operation.
This is essentially a "compile time" opportunity to find data
that is not where it is wanted. The complexity of analysis at
this phase may vary, throughout various stages before the final
machine code is produced.
- Runtime type checking : this may be implemented in both
interpreted or compiled runtimes. The most performant code is of
course, compiled code with no runtime checks, WHEN CODE IS
PREDICTABLE. Whereas, CODE THAT BRANCHES HEAVILY may be more
performant with just-in-time type checking, depending on the
specific nature of the code.
2025-06-04 at 4:02 pm
Type Systems and Politics : prejudice
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment