For a generic solution that works on all new types you can create a common ancestor and define
function ==(a::Ancestor, b::Ancestor)
if isa(a,typeof(b)
na=names(a)
for n in 1:length(na)
if getfield(a,na[n])!=getfield(b,na[n])
return false
end
end
return true
end
return false
end
