I wasn’t planning on commenting on these things, but since Bob went down this road… I guess I’ll take the bait ;) I definitely don’t intend to start a debate, and I don’t really disagree with anything Bob said, I just want to share some context that might clarify some things.
This is also something that gives me pause, and why we haven’t finalized the decision yet. The first step is v1.0 on GitHub (coming soon!) and then we’ll see about the CRAN decision.
There are tradeoffs here. In general if lots of users and other packages depend on a package then it’s harder to retire that package, but that means lots of people are using the package, which is great! There are plenty of CRAN packages that do get retired, or the developers keep them on CRAN but announce that there will be no further development. If we’re ever in the situation where we want users to transition to a different interface, there’s nothing preventing us from stopping new cmdstanr development work and saying that going forward access to new features will require some other interface (and you can stick with the older interface if you’re fine with no new developments).
And if there ever is a replacement for CmdStan, one option would be to just swap out calling CmdStan behind the scenes with calling the new interface behind the scenes. There just isn’t a replacement for it right now.
Anyway, with cmdstanr this is all much easier than for RStan because no tests that actually run CmdStan can be run on CRAN (in cmdstanr or packages that depend on cmdstanr). That means that from CRAN’s perspective changes to CmdStan (or a CmdStan replacement that we swap in behind the scenes in cmdstanr) can’t break anything CRAN can test.
I also wonder if sometimes in Stan development discussions there’s a misunderstanding about CRAN’s policies, which are not as restrictive as they may seem (see below).
This is true, but it really depends on what you mean by “replace RStan”. Hypothetically, we could announce that there will be no new versions of Stan added to RStan ever again and all future Stan versions will be released through a new interface. Users are free to stay with the frozen RStan or change. There would be no more maintenance burden on RStan related to updating hundreds of reverse dependencies because Stan syntax changed or any other change. RStan would just stay as it is now forever, except maybe occasional minor fixes as needed (e.g. if a new Rcpp requires a small change to RStan), but nothing close to the burden now of trying to get hundreds of dependencies to update for a Stan release. I’m not saying we should do that necessarily, but it seems doable.
Of course then the burden shifts to a new interface, but it will be a better designed interface and also that’s just the deal when you have lots of people who want to write R packages that depend on your software. And it’s great for Stan that there are lots of those people!
Another option is rip out the guts of RStan and replace them what @andrjohns is making or something else, call it RStan v3 and then accept possibly breaking other packages as part of a major version bump.
CRAN’s policy is that you can make breaking changes, you just need to give other maintainers enough advance notice of the breaking change so they can update their own packages. With as many reverse dependencies as we have it’s also customary to coordinate with CRAN. We’ve been overly cautious about this because we prefer not to break packages, so @andrjohns and others have worked hard to try to make the required fixes in those other packages. But CRAN does not have a no breaking changes allowed policy. In fact the recent release of loo broke something in another package, we notified the maintainer well in advance and even provided the fix in a PR, but they didn’t merge our PR in time. CRAN still allowed the release of loo because we had followed protocol. With RStan it’s more involved because there are many packages, but if we give CRAN and package maintainers enough advance notice then it’s doable. Packages with way more reverse dependencies than RStan have successfully gone through major updates that affect lots of packages.
Anyway, my point is not that we should necessarily do any of these things, just that there are actually quite a few options if we ever want to go down that road. And I can think of several other options beyond the ones I’ve mentioned.
Yeah, in general I agree it makes sense to work on new speculative algorithms outside of Stan. Then we can put the ones that pan out into Stan if we have developers interested in doing the implementation.
Relatedly, it seems like there are some clear improvements to adaptation that have widespread support and are just waiting for someone to implement them. So in that specific case I don’t think it would be too onerous to get it through the process.