Yeah. I am already working on v1.1 and love it. The issue is there are features in v1.1 that I want to use, e.g. Base.@kwdef, that work on v1.1. but NOT on v1.0 so if I use those features, I need to worry about people still using v1.0
I think that’s the wrong way to think about it. You are writing free software, effectively donating your time and effort to other people who use the result. Your time and resources are finite, so you should be economizing on them.
If using new features of Julia makes your life a bit more convenient, you will have time to work on other stuff that benefits your users. Sensible users would recognize that they should do their part by keeping up with the latest stable release (with a reasonable lag, eg 1-2 weeks).
I totally agree with Tamas. However, if you must have 1.0, then you can use Parameters.jl whose @with_kw is essentially the same as @kwdef. You could require Parameters for 1.0 and do const @kwdef = Parameters.@with_kw and in 1.1 const @kwdef = Base.@kwdef.
This is a helper macro that automatically defines a keyword-based constructor for the type declared in
julia> Base.@kwdef struct Foo
a::Int = 1 # specified default
b::String # required keyword
Julia Version 1.0.0
but maybe has gotten new features / bugfixes in 1.1.