What about using a macro to define the common types? That would avoid the 
problem of having to visit each subtype declaration when more common fields 
are added. Is that good or bad style?

julia> macro STfields()
       quote
       a::Int
       b::String
       end
       end

julia> abstract ST

julia> type MyST <: ST
       @STfields
       c
       d
       end

julia> names(MyST)
4-element Array{Symbol,1}:
 :a
 :b
 :c
 :d

Reply via email to