From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Generalize start-process with keyword args Date: Wed, 18 Mar 2015 18:23:25 +0200 Message-ID: <83fv92xojm.fsf@gnu.org> References: <87d24d3uwz.fsf-ueno@gnu.org> <83pp87y6iu.fsf@gnu.org> <83mw3bxz9f.fsf@gnu.org> <83k2yfx8zi.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1426695839 11922 80.91.229.3 (18 Mar 2015 16:23:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2015 16:23:59 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Daiki Ueno Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 18 17:23:52 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YYGl4-0005xR-OW for ged-emacs-devel@m.gmane.org; Wed, 18 Mar 2015 17:23:50 +0100 Original-Received: from localhost ([::1]:34717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYGl3-0003in-Tm for ged-emacs-devel@m.gmane.org; Wed, 18 Mar 2015 12:23:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYGkv-0003iR-MC for emacs-devel@gnu.org; Wed, 18 Mar 2015 12:23:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYGko-0007vN-VB for emacs-devel@gnu.org; Wed, 18 Mar 2015 12:23:41 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:44691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYGko-0007v4-IY; Wed, 18 Mar 2015 12:23:34 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NLF00G00115FV00@mtaout25.012.net.il>; Wed, 18 Mar 2015 18:18:29 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLF005SU1ATBGA0@mtaout25.012.net.il>; Wed, 18 Mar 2015 18:18:29 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183996 Archived-At: > From: Daiki Ueno > Cc: Stefan Monnier , emacs-devel@gnu.org > Date: Wed, 18 Mar 2015 15:17:39 +0900 > > > IMO, it will be terribly confusing to have incompatible treatment of > > nil in this one API. > > I tend to agree with Stefan, as I find no documentation about the > implication of no-conversion for ":coding nil" except in the C source > code. Since you mentioned the documentation, you seem to interpret "confusing" as in "confusing Lisp programmers". But that's not what I meant: I meant that this unfortunate convention will confuse Lisp programs which call this API instead or together with the existing APIs. Despite what you might think, this convention _is_ used in several places in Emacs sources; I've bumped into it in the past. If 'make-process' wants to be compatible with existing interfaces, it should use the same conventions. For example, imagine some wrapper around 'make-process' that generates the coding systems from some data, like MIME charset or something. Such programs usually test the validity of the result by calling coding-system-p (which returns t for nil), and if that returns OK, go ahead and use the resulting coding system. Imagine the confusion if 'make-process' rejects such values, or assigns its own semantics to some of them. I could support a thorough eradication of this convention from all related interfaces. But doing that for a single interface is not TRT, IMO, as it will increase the memory pressure on the Lisp programmers, which will now have to remember 2 different conventions about this, and also which API supports which semantics of nil there. Moreover, if we ever want to replace 'start-process' with 'make-process' in some it the users of the former, we will now have to remember to add code that, when given nil, passes 'binary'. That's worse than bad conventions, IMO.