What is the "them" to be omitted if there is only one type parameter? It wouldn't make sense to omit the brackets (because there needs to be some delimiter between the name of the generic function/type and the type argument). But if there is only one type-parameter anyway, I don't know what else you would omit.
Either way - you are using `sync.Map` to motivate this, with a clear analogue to `map`. But what about types that *don't* represent a map (like the Graph-example, where both type-parameters are on mostly equal footing)? And what about generic functions? I think Foo[int]string(bar, baz) isn't super readable, TBH. In short, I think that introducing this sort of asymmetry into the syntax hurts more than it helps. On Mon, Jan 4, 2021 at 9:41 PM 'Anonymous AWK fan' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I think something like sync.Map[string]linked.List string is more readable > than sync.Map[string, linked.List[string]]. > > I propose putting the last type parameter to a generic type after the > square brackets and omitting them when there is only one type parameter. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/125582361.510700.1609792751744%40ichabod.co-bxl > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfFwHU35S9p2psHqNWGvw9U9bmbi%2B8hQirMnZ97O6U7%2BHA%40mail.gmail.com.