I’m just starting to review @rybern’s awesome work on this and agree with Dan that moving to only accept the new syntax is definitely a 3.0 change. I wonder if we can do a little work to avoid breaking backwards incompatibility- Ryan (or others) do you think there’s a way to make stanc3 parse both old and new formats seamlessly? Or perhaps we can expose this new syntax only if you do some kind of special signifier comment at the top of the file like ### using Stan 3.0 ###
?
If not, I think there are a couple of other things we wanted to get into Stan language 3.0. I kept something of a partial list as they came up but I don’t think it’s complete and hope everyone can chime in:
- Remove everything currently marked deprecated (get_lp, if_else, increment_log_prob, log suffixed functions, lp_… more?)
- Unify shadowing rules w.r.t. nullary functions
- Maybe: remove data keyword? Idea here was to have the compiler do this automatically, though I think maybe it’s not doing this across function boundaries yet (?)
- Maybe: remove target increments (and access?) from user-defined functions (Sean: I forget why this was on my list, maybe to make compilation easier?)
Definitely seems very incomplete; these notes are like 2 years old, haha. Just wanted to raise the topic and give what I have and hear what other folks may have been saving up for Stan 3.0.
I’d also like to make sure when we do release 3.0 that it’s very easy to run a command to at least translate a file from Stan 2 to Stan 3. I think with our compiler framework that shouldn’t be too hard, though we may need to keep separate copies of the front-end around in the code base for that purpose…