I miss named function arguments too.

The closest replacement I've discovered in Go is pass a struct literal, or 
pointer to such, which can then document or leave out arguments as desired. 
e.g.

type temperature struct {
  fahrenheit float64
  celcius    float64
}

func set(temperature{celcius: 38.5}) {
   ...
}

which reads rather nicely. No need to fill in all the unused arguments, as 
they get zero values.



-- 
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/f1f6e3e1-dbc8-48cb-847e-fac7cb7b46db%40googlegroups.com.

Reply via email to