Sorry if this question reveals my newness to Go. I tried searching the 
mailing list but I couldn't find anything in a quick search. It seems like 
many languages include the ability to check if an array, or slice contain a 
particular value. I understand that you could do this easily with a for 
loop or alternatively use a map instead. However, is there a reason why Go 
doesn't just have slice.Contains(interface{}) or maybe a builtin 
contains(mySlice, interface{}) ?

I assume one reason might be because slices could potentially be really 
large? Or maybe the community feels that a simple for loop is so easy that 
it is not necessary? I would love to understand this more.

Thank You!

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 view this discussion on the web visit

Reply via email to