Parameter packs for (de)serialization

Oh yeah, that is true. This is probly what the C++ implementation looks like regardless.

If this comes into the language before tuples, is there any reason to do anything other than placeholder functions?

I guess, which is easier to deprecate?

And another couple probably not so well thought out ideas,

  1. But what about functions that have access to the data, transformed data, parameters, and transformed parameters blocks? Maybe they’d be functor types or something? So that methods that accepted them could call things like get_flat_list_of_parameters(), get_flat_list_of_data() or whatever?

  2. What about parameterpacks in Stan?

But yeah those sound way harder than what you’ve already designed here in like 40 lines of code hahaha. But for the fuuuuuuture.

As a side note for #1, a problem came up recently where a user accidentally packed in parameters they weren’t using and it caused the algebra solver to break: Algebra solver has a side effect on log probability

Might be avoidable if these autodiff links were handled automagically?