Jan Mercl
unread,Jun 26, 2025, 3:34:46 AMJun 26Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robert Engels, Axel Wagner, Pierre Durand, golang-nuts
On Thu, Jun 26, 2025 at 9:12 AM Robert Engels <
ren...@ix.netcom.com> wrote:
> Because the stdlib generic map is not 1) an interface (e.g. cannot have concurrent semantics with same syntax ) and 2) cannot work with arbitrary types - they must implement comparable.
I quoted a sentence with a complain about the lack of a generic map
in the stdlib. I was not responding to anything else, so please let's
not change the topic.
However, if we are now talking about interfaces. Everyone is free to
design an interface suitable to be implemented by a hash map. That
defintion could also be somewhere in the stdlib, yes. If only we can
all have the same needs or if there's an obvious design of said
interface that covers all needs. Everyone is free to propose it on the
issue tracker.
I am afraid, however, no such generally acceptable map interface design exists.
Looking at the Java map interface defintion makes my eyes bleed, but
maybe that's just me.