Hi all -

I know that there’s have been numerous threads regarding the syntax for 
declaring generic types etc, and at it’s core Go is a language that can do a 
lot without syntactic sugar just for the sake of it, but sometimes that 
syntactic sugar helps in a fundamental way - legibility.

Observe this function declaration

func Combine(type T)(s []T) (T,error){
 ….
}

Do we think that 3 consecutive clauses wrapped in parentheses is legible, that 
the intent of both the function and its constraints are easily discernible?
To me, and it is only my opinion, unless (type T) has different ‘versions’ i.e. 
(struct T) or (func T), isn’t "(type " not only redundant but reduces 
readability?

Apologies if this has been discussed before.

Calum


-- 
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/6661399B-BF48-4D15-802C-E2B1C6C0F348%40gmail.com.

Reply via email to