consider 

func Foo(a int, b string, x SomeStruct)


It would be nice if it was possible to pass in the "don't care" value, 
a.k.a. "_" as one of the argument, as an alias for the default value of the 
type.

pkg.Foo(a, b, _) 


This way if the user knows he doesn't care about the last value and that 
the default is fine. He can use that syntax to just give the zero value.

This could be extended to returns

func Bar() (SomeStruct, error) { 

...

if err != nil { 

return _, err

} 

...

} 


or things like channels

var c chan struct{}

c <- _ 

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to