Collections
Targo gives you two collection styles:
- Go-native collections such as
slice<T>,map<K, V>,Fixed<T, N>, andchan<T> - runtime-backed collections such as
Array<T>
Choose first, then code
Prefer slice<T> when
- you are writing core logic
- you want Go-native semantics
- you care about low-overhead Go interop
Prefer Array<T> when
- you explicitly want
push,map,filter, orreduce - you are preserving a JS-style collection workflow on purpose
Remember
map<K, V>is the Targo map type, not JSMapchan<T>is a Go concurrency channel, not a Promise abstraction