# New array syntax might mean Stan language 3.0?

**URL:** <https://discourse.mc-stan.org/t/new-array-syntax-might-mean-stan-language-3-0/17448>\
**Category:** Developers\
**Created:** [August 14, 2020, 12:37pm UTC](https://discourse.mc-stan.org/t/new-array-syntax-might-mean-stan-language-3-0/17448 "2020-08-14T12:37:30Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![Bob\_Carpenter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bob_carpenter/32/9230_2.png) [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Post date:** [August 19, 2020, 6:22pm UTC](https://discourse.mc-stan.org/t/new-array-syntax-might-mean-stan-language-3-0/17448/15 "2020-08-19T18:22:13Z")

</div>

> [@seantalts](#):
>
> moving to only accept the new syntax is definitely a 3.0 change

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.

> [@seantalts](#):
>
> it’s very easy to run a command to at least translate a file from Stan 2 to Stan 3.

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.

> [@seantalts](#):
>
> I think `array` as a new keyword is still backwards incompatible, though, right?

> [@seantalts](#):
>
> I was under the impression those should have already been reserved words but just hadn’t been due to implementation details, essentially.

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.

> [@seantalts](#):
>
> Maybe: remove data keyword

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`).

> [@seantalts](#):
>
> Maybe: remove target increments (and access?) from user-defined functions (Sean: I forget why this was on my list, maybe to make compilation easier?)

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

> [@rybern](#):
>
> the context needed to figure that out is too far in the future.

Always a pain with bottom-up parsing.

> [@seantalts](#):
>
> We could kind of freeze it at the version 2.0 before offset and multiplier and use it as part of a `stanc3 upgrade` subcommand? Curious what @Bob_Carpenter and others think about that.

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?

---

_[View the full topic](https://discourse.mc-stan.org/t/new-array-syntax-might-mean-stan-language-3-0/17448)._
