From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: Elisp / C inconsistency for reading "1." Date: Sat, 15 Mar 2014 17:21:26 +0100 Message-ID: <85vbvf8m3j.fsf@iznogoud.viz> References: <53231298.9090905@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1394900780 11695 80.91.229.3 (15 Mar 2014 16:26:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Mar 2014 16:26:20 +0000 (UTC) Cc: Paul Eggert , Oleh Krehel , emacs-devel@gnu.org To: Stefan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 15 17:26:27 2014 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 1WOrPm-0002fq-SZ for ged-emacs-devel@m.gmane.org; Sat, 15 Mar 2014 17:26:26 +0100 Original-Received: from localhost ([::1]:50605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOrPm-0007py-GM for ged-emacs-devel@m.gmane.org; Sat, 15 Mar 2014 12:26:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOrPf-0007fh-ER for emacs-devel@gnu.org; Sat, 15 Mar 2014 12:26:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOrPZ-0007AW-N8 for emacs-devel@gnu.org; Sat, 15 Mar 2014 12:26:19 -0400 Original-Received: from b2bfep13.mx.upcmail.net ([62.179.121.58]:55629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOrPZ-000791-CH for emacs-devel@gnu.org; Sat, 15 Mar 2014 12:26:13 -0400 Original-Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep13-int.chello.at (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20140315162610.BAMQ7186.b2bfep13-int.chello.at@edge12.upcmail.net>; Sat, 15 Mar 2014 17:26:10 +0100 Original-Received: from iznogoud.viz ([91.119.208.191]) by edge12.upcmail.net with edge id dsS91n00248JfXf0CsS9GS; Sat, 15 Mar 2014 17:26:10 +0100 X-SourceIP: 91.119.208.191 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1WOrPU-0000Tv-Rm; Sat, 15 Mar 2014 17:26:08 +0100 Mail-Followup-To: Stefan , Paul Eggert , Oleh Krehel , emacs-devel@gnu.org User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 62.179.121.58 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:170395 Archived-At: On Fri, Mar 14 2014, Stefan wrote: >> More important, it feels wrong coming from a Lisp background, as Common Lisp >> and Scheme both interpret "1." to be a floating point number. I would >> support changing Emacs Lisp to be consistent with common practice, as there >> seems no point to being different and there are advantages to being >> consistent. (Not during the feature freeze though, of course.) > > I'd tend to agree, indeed. But please don't base your opinion on a wrong assumption about Common Lisp, see [1], Integers can be written as a sequence of digits [...] optionally followed by a decimal point; And, to be really pedantic, let's add that `integer' and `float' are disjoint types, see [2], The types rational and float are disjoint subtypes of type real. and [3], The types integer and ratio are disjoint subtypes of type rational. This remark is actually pertinent here, because the emacs CL package seems to emulate these type relations (as far as corresponding objects exist in emacs-lisp). (cl-typep 1. 'integer) => t (cl-typep 1. 'float) => nil [1] http://www.lispworks.com/documentation/HyperSpec/Body/02_cbaa.htm [2] http://www.lispworks.com/documentation/HyperSpec/Body/t_real.htm [3] http://www.lispworks.com/documentation/HyperSpec/Body/t_ration.htm Wolfgang