docs: close general map and set validation gate

This commit is contained in:
dev committed 2026-10-07 11:41:06 +03:00
1 parent 4716cda0f1
commit 4114a39846
4 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
# Owning hash map design
Status: STD-6d.2 numeric-key branch implementation (RFC 0028 Proposed); general keys remain Q-037. Spec 16 §2.13 is normative for std.map. This document records design rationale and does not override the specification.
Status: STD-6d.2 numeric-key and STD-6d.4/5 general-key branch implementations validated (RFCs 0028/0030/0031 Proposed); Q-037 resolved. Spec 16 §2.13–§2.15 is normative for std.map/std.hashmap/std.hashset. This document records design rationale and does not override the specification.
## Key policy and scope
The eventual collection gate still requires HashMap<Key, Own<Value>>. At the numeric-map decision, type parameters supplied no hashing/equality operations (spec 15 §15); Copy supplies neither. RFC 0029/spec 15 §18 now supplies explicit static functions without runtime callbacks, methods, user traits or captured values. Treating a digest as key identity is incorrect because different keys can collide. Adding a language feature solely to make this API look generic would add more agent concepts before establishing their general value.
The initial branch increment was `std.map.U64Map<V>`: exact u64 keys, generic Copy or linear values, initialized buffer primitives and explicit error construction (RFC 0027). Users with genuine numeric identifiers can use it directly. Bytes/struct keys cannot be converted to digests and then treated as unique numeric keys; general key hashing/equality is Q-037. Byte-key ownership needs a separate owning representation contract. Do not name this specialization HashMap<K,V> or claim that it satisfies the general-key gate.
The initial branch increment was `std.map.U64Map<V>`: exact u64 keys, generic Copy or linear values, initialized buffer primitives and explicit error construction (RFC 0027). Users with genuine numeric identifiers can use it directly. Bytes/struct keys cannot be converted to digests and then treated as unique numeric keys; general key hashing/equality was Q-037, now resolved by explicit static policies and dense complete owning entries (spec 16 §2.14–§2.15). Byte-key ownership uses that general owning representation contract. Do not name this specialization HashMap<K,V> or claim that it satisfies the general-key gate.
## Public API