JuliaLang/julia

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

開放

#4,648 建立於 2013年10月26日

 (60 則留言) (44 個反應) (1 位負責人)Julia (5,773 個分叉)batch import
breakingequalityhelp wantedneeds decision

倉庫指標

星標
 (48,709 顆星)
PR 合併指標
 (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.

貢獻者指南