JuliaLang/julia
== for immutables should recursively call == on its fields
Ouverte
#4 648 ouverte le 26 oct. 2013
breakingequalityhelp wantedneeds decision
Métriques du dépôt
- Stars
- (48 709 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
This doesn't make much sense:
julia> immutable Foo{T}
bar::T
end
julia> Foo("baz") == Foo("baz")
false
julia> Foo("baz").bar == Foo("baz").bar
true
julia> Foo(1) == Foo(1)
true
If the fields are == to each other then the objects should be == to each other.