This seems to work, providing the equivalent to C++ class data members, any better suggestions?
immutable MyObj_a end
type MyObj
MyObj() = new()
a::Int=0
MyObj(::Type{MyObj_a}) = a
function MyObj(::Type{MyObj_a}, i::Int)
a = i
end
end
# nicer wrappers
get_a(::Type{MyObj}) = MyObj(MyObj_a)
set_a(::Type{MyObj}, i::Int) = MyObj(MyObj_a, i)
# and an immutable for luck
get_b(::Type{MyObj}) = 55
Cheers
Lex
