-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Task
Implement Map[K, V] as a built-in generic collection type.
Acceptance criteria
- Type syntax:
Map[Str, Int],Map[Str, Bool], etc. - Non-empty literal infers types:
{"a": 1}→Map[Str, Int] - Empty literal requires annotation:
var m: Map[Str, Int] = {} - Mixed-type literals are a compile-time error
Kmust be hashable — compile-time error if not- Map is unordered; no iteration order guaranteed
- Methods:
len(),contains(key),get(key),get(key, default),add(key, value),remove(key) - Mutating methods (
add,remove) requirevarreceiver — compile-time error onconst
Spec
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request