Home /Modules/collections/SLList.md

SLList.md

lib/collections/SLList.md · 31 line(s) · markdown

SLList

SLList is a concrete, string-valued list in the SLeeLa collections library. It deliberately uses existing SLeeLa syntax and VM-managed arrays; it does not require Generics or new VM opcodes.

Operations

Indices are zero-based. Invalid mutations do not change the list. The backing array may retain unused trailing slots after removal; size is the logical length and only indices below it are visible through the public API.

This first version intentionally accepts Strings only. It is not a heterogeneous SLValue collection and is not a generic List<T>. The source/VM audit and proposed type-safe design are documented in SLList-Heterogeneous-Design.md. That design requires an explicit dynamic value type and checked type conversion; it is not safe to emulate with unchecked mixed-type array writes.

Example

See SLListBasic for a small exercise of append, read, replace, remove, bounds behavior, clear, and reuse.