> Unlikely :-) > > The following is much less obscure. > > func Shuffle(slice inteface{}) > > & might have more more sense. e.g. > > var cards []card > ... > rand.Shuffle(cards)
you've now restricted Shuffle to "shuffling" only slices. and it has to examine interface{} to determine if it's "shuffle-able". calling Shuffle(nil) in your example would still not do anything (which is one of the original issues of OP). i posit that the current shuffle makes good sense given the language. metaphysics notwithstanding. -- 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.