Even in OO style (e.g. java), you would not be able to write
 Set s = null;
 s.init( list(1,2,3) );

This is (more or less) the same problem with value receiver.
However, map is a reference type, so once the map has been created you really 
can use value receiver : https://play.golang.org/p/FePU2I-u2-

If your concern is about "allocating a map with make, exactly the size of the 
input slice", then consider that the "constructor-like" idiom in go is a 
function NewSet, not a method :
https://play.golang.org/p/6H1ThzyhbM

-- 
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