What is Nostr?
Nicolas Martyanoff /
npub17vs…jc6l
2024-02-16 14:18:54

Nicolas Martyanoff on Nostr: The #Go slices package makes common operations much more compact, this is good. If ...

The #Go slices package makes common operations much more compact, this is good. If you're still using 1.20 or older (what's your excuse?), you can use golang.org/x/exp/slices instead.

But there is no Map method. Or Filter (which should always be two functions, Select and Reject). Or Fold. They were proposed more than 2y ago and of course rejected by Go developers because they should be part of a "stream API" (???) which of course never manifested. As it was for packages, it is going to take years to get what is standard in most sane languages.
Author Public Key
npub17vstmkjpd25e72hqjjwu54krhav2nq2unhnm49g268a9drdzhqtqjmjc6l