From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Unary / Date: Thu, 15 Oct 2015 12:20:42 -0700 Organization: UCLA Computer Science Department Message-ID: <561FFC8A.8030701@cs.ucla.edu> References: <87pp0gweri.fsf@fencepost.gnu.org> <22047.37539.943171.429065@turnbull.sk.tsukuba.ac.jp> <877fmouyt3.fsf@gnu.org> <87d1wgwclb.fsf@fencepost.gnu.org> <871tcww7q9.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1444936879 2172 80.91.229.3 (15 Oct 2015 19:21:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Oct 2015 19:21:19 +0000 (UTC) Cc: "Stephen J. Turnbull" , emacs-devel@gnu.org To: Stefan Monnier , David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 15 21:21:11 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 1Zmo5O-0005eO-PK for ged-emacs-devel@m.gmane.org; Thu, 15 Oct 2015 21:21:11 +0200 Original-Received: from localhost ([::1]:49299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zmo5N-0005mG-Ri for ged-emacs-devel@m.gmane.org; Thu, 15 Oct 2015 15:21:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zmo53-0005kB-Qy for emacs-devel@gnu.org; Thu, 15 Oct 2015 15:20:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zmo53-0007D7-3S for emacs-devel@gnu.org; Thu, 15 Oct 2015 15:20:49 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zmo4y-0007C3-M4; Thu, 15 Oct 2015 15:20:44 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EBC42160CB6; Thu, 15 Oct 2015 12:20:43 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id N4B15r3wK1fA; Thu, 15 Oct 2015 12:20:43 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2F3B3160D3D; Thu, 15 Oct 2015 12:20:43 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id U3OzshnlvahY; Thu, 15 Oct 2015 12:20:43 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1069E160CB6; Thu, 15 Oct 2015 12:20:43 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:191678 Archived-At: On 10/15/2015 11:45 AM, Stefan Monnier wrote: > Indeed, the - has the same asymmetry, but it seems that "unary -" is much > more commonly found operator than "unary /". I suspect David was being ironic.... Unary / is rare in Elisp code, partly because the GNU Emacs byte compiler complains about it, partly because it doesn't work in GNU Emacs 24.2 and earlier, partly because it has the Common Lisp semantics in XEmacs, and partly because one doesn't often need the reciprocal of a floating-point number. With all that being said, it's a bit more useful for (/ N) to return the reciprocal of N than to return N, so we might as well be compatible with CL here. I've proposed a patch to change unary / to behave more like CL, in Bug#21690. Since we're in feature-freeze now isn't a good time to be changing the semantics of /, but there's no rush. In the meantime we can leave the byte-compiler alone, as its bogus warning about (/ N) will help scare users away from the soon-to-be-withdrawn semantics.