JuliaLang/julia

== for immutables should recursively call == on its fields

Open

#4.648 aberto em 26 de out. de 2013

Ver no GitHub
 (60 comments) (44 reactions) (1 assignee)Julia (5.773 forks)batch import
breakingequalityhelp wantedneeds decision

Métricas do repositório

Stars
 (48.709 stars)
Métricas de merge de PR
 (Mesclagem média 20d 6h) (157 fundiu PRs em 30d)

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.

Guia do colaborador