uggh. I should have started simpler. My premise was wrong. I have a worse lack of understanding mutables vs const than I thought. It does way more than just make contents unchangeable.
julia> mutable struct S; x::Int; end#struct##
julia S(1) == S(1)
I had known that
S(1) === S(1), because the left object is distinguishable from the right object. The L creates an object different from the R, so assigning to one would not be the same as assigning to the other.
So what is
S(1) == S(1) actually testing that is different from
S(1) === S(2) with mutable structs?
julia> struct R; x::Int; end#struct##
julia R(1) == R(1)
Similar question here for immutable. Again,
=== seem to do the same thing.
It is a virtue when programming languages give the naively expected results…