Its worth noting that Rust does something similar with the "turbofish"
operator in expressions:
"42".parse::<i32>()
I personally think this works quite well.
On Wednesday, July 15, 2020 at 5:41:51 AM UTC-7, Michal Strba wrote:
>
> Angle brackets are only problematic in expressions in the bodies of
> functions when specializing a function or a type, right? They are not
> problematic in signatures and type definitions.
>
> What about using a dot when specializing in bodies?
>
> func zero<T>() T {
> var z T
> return z
> }
>
> func main() {
> x := zero.<int>() // requires a dot
> }
>
> This is less weird than it looks, because Go already uses a dot for type
> assertions and this is a similar thing.
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/e7d2b4f6-b11d-47e0-b7cd-19b38d9b06d3o%40googlegroups.com.