From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id 3A3235D5 for ; Mon, 4 Jan 2021 06:05:38 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.78,473,1599516000"; d="scan'208";a="485189825" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 04 Jan 2021 07:05:37 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id 3BA05E01D2; Mon, 4 Jan 2021 07:05:37 +0100 (CET) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 69470E01D2 for ; Mon, 4 Jan 2021 07:05:28 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-lf1-f45.google.com IronPort-PHdr: =?us-ascii?q?9a23=3AIFy+5hRw3LhbVoZLNhRq4eW+8tpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa6ybByN2/xhgRfzUJnB7Loc0qyK6v+mAzdaqsrQ+Fk5M7V0Hycfjs?= =?us-ascii?q?sXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6?= =?us-ascii?q?KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAi0oAnLqMUbj5VuJqk+xxbNv3BFZ/?= =?us-ascii?q?lYyWR0KFyJgh3y/N2w/Jlt8yRRv/Iu6ctNWrjkcqo7ULJVEi0oP3g668P3uxbD?= =?us-ascii?q?SxCP5mYHXWUNjhVIGQnF4wrkUZr3ryD3q/By2CiePc3xULA0RTGv5LplRRP0lC?= =?us-ascii?q?sKMSMy/XrJgcJskq1UvB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Zxu1+Bcr1X1uYLNiMQVei?= =?us-ascii?q?BN6hBGNoF49j85o1e094Xu6aoFXD0i6tWeJHkrWKANkw/PuZ0SSsYcl6zHnC2e?= =?us-ascii?q?8qiFx0GpITZ13jvbZ28k3oP6CMi1+Qzv/4eqEV3SqL/2CGnzKD?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ADAQBir/Jffy2nVdFiHAEBAQEBAQcBA?= =?us-ascii?q?RIBAQQEAQGCD4N5YI1DiCoDiix5kRILAQMBCwEBLQIEAQGESgKBbwIdBwEENBM?= =?us-ascii?q?CEAEBBQEBAQIBAwMEARMBAQ0LCwgnhWoMgjgpAYMSAQEDARIuARsdAQMBCwYFC?= =?us-ascii?q?xYlDwETEQEFARwGEyKFWQEDDiAEo0OBBD2MSQUBF4MFBoJNgWoKGSgNFU0DgTY?= =?us-ascii?q?CBwkBCIEmhWESPIYBeSYbgUE/g3wuPoo2BIJEAQFeIQUPUYEsJ7hsU4ItgyeYM?= =?us-ascii?q?SKDKY9Kj12WDZpdhFQCCgcGECOBSoF6MxoIGxU7MYI4UBkNjiGDcYpZQDM3AgY?= =?us-ascii?q?KAQEDCVYmE40LAQE?= X-IPAS-Result: =?us-ascii?q?A0ADAQBir/Jffy2nVdFiHAEBAQEBAQcBARIBAQQEAQGCD4N?= =?us-ascii?q?5YI1DiCoDiix5kRILAQMBCwEBLQIEAQGESgKBbwIdBwEENBMCEAEBBQEBAQIBA?= =?us-ascii?q?wMEARMBAQ0LCwgnhWoMgjgpAYMSAQEDARIuARsdAQMBCwYFCxYlDwETEQEFARw?= =?us-ascii?q?GEyKFWQEDDiAEo0OBBD2MSQUBF4MFBoJNgWoKGSgNFU0DgTYCBwkBCIEmhWESP?= =?us-ascii?q?IYBeSYbgUE/g3wuPoo2BIJEAQFeIQUPUYEsJ7hsU4ItgyeYMSKDKY9Kj12WDZp?= =?us-ascii?q?dhFQCCgcGECOBSoF6MxoIGxU7MYI4UBkNjiGDcYpZQDM3AgYKAQEDCVYmE40LA?= =?us-ascii?q?QE?= X-IronPort-AV: E=Sophos;i="5.78,473,1599516000"; d="scan'208";a="485189756" X-MGA-submission: =?us-ascii?q?MDEDoniFWlMUTX/UiqViWZA40MJJr4mDampRgi?= =?us-ascii?q?fnCjGxms6qymS/GCdHTFGG6BqTCrNLJSrAgiwmz5oguzTZsiUZd7/Wyl?= =?us-ascii?q?XrjP6EklLzENJgEXmYYoQv3DGvI6lmjdziTz5jwPCmga3dy/TSRxot4P?= =?us-ascii?q?cLvXn3n2d3SeQosg3uacEVPw=3D=3D?= Received: from mail-lf1-f45.google.com ([209.85.167.45]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 04 Jan 2021 07:05:27 +0100 Received: by mail-lf1-f45.google.com with SMTP id m25so61725983lfc.11 for ; Sun, 03 Jan 2021 22:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=A2xTSWTflBpSJhKC6WGfn8f/++ypVjN1r8NCICawLuQ=; b=aKAy5aXkimAWyyClSm5YcI6xNMGNxF2Es+skMoB3hLvELMKfe1MoaJCZiMbqNarRQC OqTn4ap5xR5cKy+0Msq+Jz1uFVmpVfeOuEPEj6dI1T3jWM1dQiMvbzHPZ1PcmNSsevgR qkrEYVbyLn11mzkFCBFUNUEGASQ/iC1KK2pzWCz8oxMpWQuGs9iqoB9nV5kzHhrqIzh3 IwzqCCtYzffeMRa+2N7zBRxRIgBuczwIMlFAvAbtO3rdomhIYd7SaudhgEByKs4Zq8pm tKO8LJG5DaMmthd3LDmJIXVAkIsMyQgUCWlKaI0zEfUSchwiGkXua2gIENnxoWbYal91 QBEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=A2xTSWTflBpSJhKC6WGfn8f/++ypVjN1r8NCICawLuQ=; b=h+blc/6n3i4yPO4MKL2Z2yliKJDrXIl7dyHUVw82v/HnhvDnfuPf4PX20mTp9qJ0YO pStmixFynwLO4CT9c0YzVaFIH69ZkV9Lk4sq272+HFdGfA0FdzWXwCE2RWCXSxFj97Q7 2oOO3fRTIv43L4ehbcvoYJ/K9GvLA3HooddEF1cI/VCA3FYUQPAJrEHVpqegnoBPvn7j FfgZS5WCLJ4jG5USE7+i4xjB1zhY1idgKg5x9GDq18AAsb/SejTiNCpEYyR2wa3OWjfI qM5pa7axNshxLbgGNxqz6MSrR2BD4CDOVaOaF4Pf7GCx1jtnRGiOFm+KC7RVs1vtAW49 DJ2A== X-Gm-Message-State: AOAM5331Tg3uyz0DqH4VPrmBFwxqDhObkh0rSCmqJq31E29WCEuudPtA yZsiwEbfgqvMz+cP4n4kaRA6T07y/Xs= X-Google-Smtp-Source: ABdhPJzVvfUOZc6rr3uhkc+cfrFw4KOnHxcsO1WMCqaHdlI4o/RkT+HIbKtODKj0pDUUoHnguKN6/g== X-Received: by 2002:a19:650:: with SMTP id 77mr33232023lfg.160.1609740326802; Sun, 03 Jan 2021 22:05:26 -0800 (PST) Received: from localhost (customer-109-238-136-64.stosn.net. [109.238.136.64]) by smtp.gmail.com with ESMTPSA id y3sm7225777lfy.73.2021.01.03.22.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 22:05:26 -0800 (PST) References: <101ac12b-89c3-4803-6fcb-288949a164cd@web.de> User-agent: mu4e 1.2.0; emacs 27.1 From: Malcolm Matalka To: Markus Elfring Cc: caml-list@inria.fr In-reply-to: <101ac12b-89c3-4803-6fcb-288949a164cd@web.de> Date: Mon, 04 Jan 2021 07:05:25 +0100 Message-ID: <86im8dgrtm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Determining compatibility for evolving programming interfaces Reply-To: Malcolm Matalka X-Loop: caml-list@inria.fr X-Sequence: 18327 Errors-To: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Markus Elfring 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