caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Malcolm Matalka <mmatalka@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Determining compatibility for evolving programming interfaces
Date: Mon, 04 Jan 2021 07:05:25 +0100	[thread overview]
Message-ID: <86im8dgrtm.fsf@gmail.com> (raw)
In-Reply-To: <101ac12b-89c3-4803-6fcb-288949a164cd@web.de>


Markus Elfring <Markus.Elfring@web.de> writes:

> Hello,
>
> OCaml is also an instance of a programming language where type inference belongs
> to core functionality. The usage of various data types will evolve in several
> programming interfaces.
>
> * How do you think about to check if API revisions are still
> compatible there?

IME, this is really up to the author and I don't know if there is a
single correct answer.  Usually people define it as if, between
versions, the function does the same thing given the same inputs.  The
common question is: what about bug fixes?  Whether or not the fix is to
document the bug fix because people depend on it or break it is up to
the developer.

>
> * Which kind of variations can be occasionally tolerated in interface
> descriptions?

From a technical perspective, the following are safe:

- Adding optional parameters

- Supporting more polymorphic variant types.

- Returning fewer polymorphic variant types.

- Probably similar with objects but I don't have much experience with
  objects.

From a human perspective, I tend to be OK with breaking changes if the
cause a compilation failure, that way the developer is forced to
understand the change and update it.  If an interface is sufficiently
changed, I might just make a new library (library2) that implements the
change, especially if the core functionality is staying the same and I'm
mostly changing the feel of the library.  That's also nice if you're
comparing two implementations and want to have them side-by-side.

I, personally, find semantic versioning to be not very useful because,
at the end of the day, it requires humans to make decisions about if
their changes fit into the various categories of change, and by our
nature we don't like to increment the major version for some reason.
I've come across numerous libraries in opam that break even compiling
despite not changing the major.

>
>
> I would appreciate your advices.
>
> Regards,
> Markus

  reply	other threads:[~2021-01-04  6:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02  7:50 Markus Elfring
2021-01-04  6:05 ` Malcolm Matalka [this message]
2021-01-04  7:59   ` Fabrice Le Fessant
2021-01-04 16:07 ` Yawar Amin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86im8dgrtm.fsf@gmail.com \
    --to=mmatalka@gmail.com \
    --cc=Markus.Elfring@web.de \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).