Is there a shorthand to make all fields of a struct the same type?

E.g

struct  myStruct
     ::Float64   #apply to all
      a
      b
      c
end

mauro3/Parameters.jl: Types with default field values, keyword constructors and (un-)pack macros (github.com) has a @deftype macro.
E.g.

@with_kw struct myStruct @deftype Float64
    a
    b
    c 
end
2 Likes