Static copy
Copied from docs/en/decisions/adp-001.md in https://github.com/poppy-team/aipo-lang (MIT). Pinned to revision ce47c4e070404fc41722ccd8e2b7b808b99062a8, blob 5cafae0c95500ebd92a13a8c715f93a148f9057f. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.
The Aipo language required a clear strategy for handling raw binary byte streams, collection slicing, and bounded mathematical clamping operations.
Bytes as a First-Class Value Type:
Bytes is represented in the VM as a contiguous buffer of unsigned 8-bit integers, exhibiting value semantics and reference counting.read_u16_le, write_u32_be).Tolerant Slicing:
collection[start..end]) silently clamps out-of-range slice boundaries to the actual length of the collection, avoiding unnecessary runtime panics during safe read-only operations.Inverted Bounds Handling in clamp:
clamp(val, min, max) where min > max trigger an explicit domain fault rather than yielding corrupted or undefined outputs.