New array syntax might mean Stan language 3.0?

Absolutely. Anything that breaks backward compatibility should up the major version number on everything. There’s a lot of other deprecated junk we can clean out, too, as @seantalts also mentions.

Doing this will break all the case studies, books, etc. that use arrays, which means pretty much everything.

That would take most of the sting out of the move, at least for power users who use Stan directly (and the brms/rstanarm, etc. users wouldn’t notice). We’ll have to update all of our core doc, too. I can volunteer to do the latter.

If we introduced new R packages for version 3, it won’t break any existing code. I think CmdStan users will be more amenable to running command-line programs to modify their old programs. In fact, we could just build that into the parser so that we could add a flag to accept Stan 2 by translating first to Stan 3. Not ideal, but workable.

As @rok_cesnovar points out, we’ve been pretty slack on the reserved words. Every time we introduce a function we don’t allow variables to be named that any more.

The data keyword is really doing two things now, that need to be teased apart. One is that it’s not an autodiff variable (as in integrate_ode) and the other is that it is constant data (as in map_rect).

They have a side effect on lp__ (in addition to print or exception side effects). Also, I don’t think they’re used much.’

Always a pain with bottom-up parsing.

I like the idea of just adding a 2.0 to 3.0 converter and having that be an option when running Stan. But I may not be thinking this through clearly and am not at all wedded to the idea.

Why before offset and multiplier?