>
> makes it easier to visual parse
>
Are you sure? It may be a personal thing, but "visual parsing" of these <<< 
really annoys me, I would prefer `[]`, but I like `()` more than `<>`. In 
addition, a good IDE (not that well known overhyped editor on steroids) 
will highlight these fragments, so not really a problem.


среда, 17 июня 2020 г., 19:36:10 UTC+3 пользователь Charles Crete написал:
>
> Based on the new proposal, having the type parameters as () seems very 
> confusing, as now 3 things in a row use ():
> - Type parameters
> - Function parameters/arguments
> - Return tuple
>
> This results in code like (from the draft):
> func Stringify(type T Stringer)(s []T) (ret []string) {
>   for _, v := range s {
>     ret = append(ret, v.String())
>   }
>   return ret
> }
>
> Instead, using <> similar to other languages, makes it easier to visual 
> parse:
> func Stringify<T Stringer>(s []T) (ret []string) {
>   for _, v := range s {
>     ret = append(ret, v.String())
>   }
>   return ret
> }
>
> This can also apply to type definitions:
> type Vector<T> []T
>
> To summarize:
> - Having 3 times () in a row makes it confusing to visual parse
> - The type keyword is not necessary
> - Using <> would make it friendly (and easier to recognize)
>

-- 
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/2f79e6cb-1575-43f2-b213-eb0a59a46853o%40googlegroups.com.

Reply via email to