From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii <eliz@gnu.org> Newsgroups: gmane.emacs.devel Subject: Re: Lisp Api and backward compatibility Date: Fri, 12 Apr 2019 23:20:35 +0300 Message-ID: <83ef67kmb0.fsf@gnu.org> References: <eac6e638-b121-2726-085b-d7b12bb41b39@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243143"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Sameer Rahmani <lxsameer@gnu.org> Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 12 22:21:02 2019 Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org> Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>) id 1hF2fV-00115Z-4j for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2019 22:21:01 +0200 Original-Received: from localhost ([127.0.0.1]:42209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>) id 1hF2fU-0006Fb-52 for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2019 16:21:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1hF2fN-0006FO-El for emacs-devel@gnu.org; Fri, 12 Apr 2019 16:20:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1hF2fM-0004ZP-DL for emacs-devel@gnu.org; Fri, 12 Apr 2019 16:20:52 -0400 Original-Received: from [176.228.60.248] (port=3287 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@gnu.org>) id 1hF2fL-0006PF-5O; Fri, 12 Apr 2019 16:20:51 -0400 In-reply-to: <eac6e638-b121-2726-085b-d7b12bb41b39@gnu.org> (message from Sameer Rahmani on Fri, 12 Apr 2019 21:09:54 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." <emacs-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>, <mailto:emacs-devel-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/> List-Post: <mailto:emacs-devel@gnu.org> List-Help: <mailto:emacs-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>, <mailto:emacs-devel-request@gnu.org?subject=subscribe> Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org> Xref: news.gmane.org gmane.emacs.devel:235379 Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/235379> > From: Sameer Rahmani <lxsameer@gnu.org> > Date: Fri, 12 Apr 2019 21:09:54 +0100 > > What should i consider before changing the signature of a function which > is part of the public api of a library ? should I add the new argument > as the last argument ? what do we usually do for backward compatibility ? It is best not to make incompatible changes, if that's reasonably possible. E.g., if there is a manifest variable that controls the behavior, it is better to introduce an additional value of that variable than completely change the API. If it isn't reasonable to keep backward compatibility, then some kind of optional behavior that defaults to the previous one is the next best choice. For more specific responses, please tell more about the API you think is in need of change, and why. Thanks.