stlib arraylist
This commit is contained in:
@@ -743,9 +743,23 @@
|
||||
- final open-constant defaults feed one last inference fixpoint before stale
|
||||
specializations are pruned
|
||||
|
||||
30. basic `std/arraylist` implementation using the new `std/mem` typed allocation
|
||||
30. Zig-style type factories and basic `std/arraylist` (implemented; v1)
|
||||
- comptime-only functions may return `type`; anonymous `struct { ... }` expressions and
|
||||
factory calls such as `ArrayList(i32)` resolve to cached nominal concrete types
|
||||
- factory parameters use the existing explicit `$T type` / integer comptime parameters;
|
||||
normal comptime control flow and helper factory calls are supported
|
||||
- type-factory calls work in signatures, nested types, struct literals, and type builtins;
|
||||
runtime materialization and recursive specializations are diagnosed
|
||||
- `std/mem` adds typed `empty` and failure-preserving `realloc`, including overflow,
|
||||
zero-count, zero-sized-type, and alignment handling
|
||||
- `std/arraylist.ArrayList(T)` exposes `items`, `capacity`, and `allocator`, with fallible
|
||||
reserve/append, roughly 1.5x growth from 8, clear-without-free, and reusable deinit
|
||||
- deferred: recursive factories, reflection, inferred type arguments, type-producing
|
||||
unions/enums, pop/insert/remove/shrink/clone container operations
|
||||
|
||||
31. disallow arbitrary integer division
|
||||
31. threading generic/polymorphic type information everywhere (init, deinit, etc.) might be annoying and verbose. consider whether generic structs could fit nicely to avoid this.
|
||||
|
||||
32. disallow arbitrary integer division
|
||||
- take inspiration from zig
|
||||
- see also below for a word on unchecked casts
|
||||
- the user should be explicit about what they mean with integer division (e.g. `div`, `rem`, `trunc`)
|
||||
|
||||
Reference in New Issue
Block a user