Why Nostr? What is Njump?
2025-01-08 15:30:10

Nicolas Martyanoff on Nostr: The old experimental Go maps package was very useful. Infortunately since 1.23 the ...

The old experimental Go maps package was very useful. Infortunately since 1.23 the new stable maps package only returns iterators, so every time you need a slice you have to wrap the call with slices.Collect.

I understand the appeal of iterators for optimization (less intermediary allocations), but I'm not a fan of the growing complexity of the langage (e.g. "func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M2, eq func(V1, V2) bool) bool", not it's not a joke).
Author Public Key
npub1dkg70vzk4vvfsc5cup9gkfu2tcrs5unysl7npfvegf78nkuswr5skh54dt