A community convention for target function return values

@ChrisRackauckas: Instead of a NamedTuple, most packages should be outputting result structs, which is essentially the same thing but allows a few other nice dispatches

Sure, as long as the struct is owned by the package that creates the target function, that would be fine too, of course. Mainly I want to enable code to implement target functions that will work with various packages later on, without depending on those algorithm packages just to define/implement the target function itself.

But I would prefer the interface be on functions, i.e. value(res) instead of on properties, i.e. res.value .

Oh, good point, a common API what works like that would be even better than a convention on NamedTuples. But we’ll need a very lightweight package that defines those functions (In BAT.jl, I now have logvalof and logvalgradof, for example). And algorithms packages will need to support it. If we could come up with a common standard here, that would be great!

One question is how to support auxiliary output - of course we could also define an “official” getauxinfo function, or so.