Closed yebai closed 3 months ago
Ah I see. I think to be more specific, the issue is that we're defining the same method (no parameters) multiple times. The Julia documentation (section 17.3) does recommend documenting different methods of the same function multiple times if their behaviour is substantial different (which I believe is the case here).
I think we have two approaches:
simulate
into one definition. I worry this definition will look very messy, and it's not clear what the top level signature would be.logdensity(dyn::LatentDynamics, step::Int, state, extra)
, defaulting to returning a NotImplemented error. This would also allow us to split the docstring for initialisation and transition methods, which would be much clearer.Option 2 sounds better to me.
This is now closed, but what are your thoughts, @willtebbutt?
I think option 2 was correctly chosen.
We currently define the same
loddensity
distribution
andsimulate
functions multiple times and attach different doc strings to them. This does not work well. See, e.g., https://turinglang.org/SSMProblems.jl/dev/, where only docs for the final definition is recognised by Julia.