The following code does not compile. What was *rationale* behind slices
being excluded from being nicely comparable by == like anything else ?
package main
import (
"fmt"
)
func main() {
var a, b []byte
fmt.Println("equals?", a == b)
}
Slices are _excluded_ from deep comparison by stating "Other values -
numbers, bools, strings, and channels - are deeply equal if they are equal
using Go's == operator." (from documentation of reflect.DeepEqual()
<http://golang.org/pkg/reflect/#DeepEqual> ).
Sorry if it is FAQ of some sort, but I seems cannot find an answer to "why".
Thank you very much,
Andrey
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.