With angled brackets, do we really need the colon or dot on both sides? Wouldn't it be enough to just have it on the left to eliminate the parse time ambiguities? Like f<:int> or f<.int>?
On Wed, 22 Jul 2020, 22:46 Евгений Кошевой, <eugene.koshe...@gmail.com> wrote: > Maybe something like this: > using <.Type.> > func f(T<.int.>) > struct{ T<.int.> } > interface{ T<.int.> } > []T<.int.>{} > > среда, 22 июля 2020 г. в 01:12:32 UTC+3, Steven Blenkinsop: > >> On Tue, Jul 21, 2020 at 3:12 PM, Michal Strba <faifa...@gmail.com> wrote: >> >>> I'd say a dot is necessary when instantiating a function call but >>> unnecessary when instantiating a type because it's always syntactically >>> clear when a type is required. >>> >> >> That's not true in Go. Conversions look like function calls: >> >> y := f(x) >> >> could be a conversion or a function call, depending on whether f is a >> function or a type. If you need to use type parameters on f, the same >> parsing problems present themselves whether it's a parameterized type or a >> type parametric function. >> >>> -- > 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/a6a400ee-b9e2-4f30-a82d-a39ad8f5aaafn%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/a6a400ee-b9e2-4f30-a82d-a39ad8f5aaafn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAJSNQU3cNoakwEhaAiSjur8Hgs%2BnoaMzEgk%2BVtG9TYKt8z2MEQ%40mail.gmail.com.