First of all, I that is a great idea for a macro, and I think it belongs in Parameters.jl with the kw_args built into it… I see no reason to separate it. So
@with_kw_typed struct Foo{T} <: SuperType
abstract1::Any = 2.0
abstract2::AbstractString = "TEST!"
abstract3 # unspecified
concrete::Float64
... # possible inner constructor
end
Second, I would still have intro users focus on named tuples, and use it throughout most of the code. I know I would use it. My goal is to avoid having to teach them about defining there own types (and the mechanics of abtract types) until later in the course. This is a longer discussion, but I want people to be able to have code with the aboslute minimum of syntax beyond the mathematics… and code that matlab users can say “wow, that is shorter and even more clear than matlab”.