JuliaLang/julia

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

Open

#4,648 创建于 2013年10月26日

在 GitHub 查看
 (60 评论) (44 反应) (1 负责人)Julia (5,773 fork)batch import
breakingequalityhelp wantedneeds decision

仓库指标

Star
 (48,709 star)
PR 合并指标
 (平均合并 20天 6小时) (30 天内合并 157 个 PR)

描述

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.

贡献者指南