[R-pkg-devel] What counts as an API change?
d@v|dhughjone@ @end|ng |rom gm@||@com
Wed Sep 25 16:27:25 CEST 2019
You're right. Indeed, assume default values are provided. I should have
been more precise.
I understand that the positional behaviour has changed. But I wonder if it
always matters. OTOH I appreciate the force of the idea that an API change
is an API change, and should be defined precisely.
On Wed, 25 Sep 2019 at 15:01, Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
> Both of your examples are incompatible.
> foo <- function (a, b, c, d, e = NA )
> (add with default value) would be compatible.
> Your second example cannot be made compatible even with default values
> because the positional behaviour has changed.
> On September 25, 2019 6:51:58 AM PDT, David Hugh-Jones <
> davidhughjones using gmail.com> wrote:
> >Hi all,
> >Philosophical question. My package follows semantic versioning (
> >https://semver.org). Incompatible API changes should trigger a major
> >version upgrade. OK, but what counts as an incompatible change to an R
> >Suppose my current function signature is
> >foo <- function (a, b, c, d)
> >and the new one is
> >foo <- function (a, b, c, d, e)
> >is that compatible? What if I add an argument, but not at the end:
> >foo <- function (a, b, c, e, d)
> >That would be incompatible if people have been calling the arguments by
> >order rather than by name. But sometimes that is unlikely: I doubt if
> >people write
> >lm(y ~ x, mydata, z==3, f, na.omit, "qr", FALSE, FALSE, TRUE, TRUE,
> >Should I be strict or relaxed about this?
> > [[alternative HTML version deleted]]
> >R-package-devel using r-project.org mailing list
> Sent from my phone. Please excuse my brevity.
[[alternative HTML version deleted]]
More information about the R-package-devel