title: What does @with_kw do in Julia?
body: <p>I am reading some code which looks like:</p>
  <pre><code> @with_kw struct HyperParams
       batch_size::Int = 128
       latent_dim::Int = 100
       epochs::Int = 25
       verbose_freq::Int = 1000
       output_dim::Int = 5
       disc_lr::Float64 = 0.0002
       gen_lr::Float64 = 0.0002
       device::Function = gpu
   end
  </code></pre>
  <p>but it is unclear to me what the <code>@with_kw</code> is doing in this context. Is this still a normal struct? It does not look like the macro is part of base Julia so I am unfamiliar with its usage here.</p>