From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Type-error in C code Date: Sat, 13 Nov 2010 20:52:25 +0100 Message-ID: <87lj4xatmu.fsf@ambire.localdomain> References: <4CDD5951.4030904@swipnet.se> <8762w2jlak.fsf@ambire.localdomain> <4CDEE4A9.2030008@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1289679025 15076 80.91.229.12 (13 Nov 2010 20:10:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 13 Nov 2010 20:10:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jan =?utf-8?Q?Dj=C3=A4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 13 21:10:21 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PHMQT-0003I3-B3 for ged-emacs-devel@m.gmane.org; Sat, 13 Nov 2010 21:10:17 +0100 Original-Received: from localhost ([127.0.0.1]:55583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHMQS-00080E-O2 for ged-emacs-devel@m.gmane.org; Sat, 13 Nov 2010 15:10:16 -0500 Original-Received: from [140.186.70.92] (port=60225 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHMDv-0000Vs-Ls for emacs-devel@gnu.org; Sat, 13 Nov 2010 14:57:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHMDd-0004o3-NL for emacs-devel@gnu.org; Sat, 13 Nov 2010 14:57:18 -0500 Original-Received: from smtp209.alice.it ([82.57.200.105]:57333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHMDd-0004m9-Co for emacs-devel@gnu.org; Sat, 13 Nov 2010 14:57:01 -0500 Original-Received: from ambire.localdomain (79.0.68.4) by smtp209.alice.it (8.5.124.08) id 4C1A27590A065815; Sat, 13 Nov 2010 20:56:55 +0100 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1PHM9B-0002Tj-MM; Sat, 13 Nov 2010 20:52:25 +0100 In-Reply-To: <4CDEE4A9.2030008@swipnet.se> ("Jan =?utf-8?Q?Dj=C3=A4rv=22's?= message of "Sat, 13 Nov 2010 20:19:05 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Windows 98 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132606 Archived-At: () Jan Dj=C3=A4rv () Sat, 13 Nov 2010 20:19:05 +0100 Interesting. Maybe they used those bits as a type indictor at one point. Looking at the X source now, I can't find any reson for this. IIRC, X was originally conceived and implemented on a Lisp system. The term "Atom", and its 29 bits max-ness are direct consequences. However, I fixed the code to use make_fixnum_or_float anyway. In the future somebody may come along and wonder why a 32-bit number is put in a Lisp integer. Not if they understand that an Atom is NOT a 32-bit number. Perhaps if you revert the change and explain the limits of the type in a nice comment, future programmers will not be inclined to wonder when they look (only) at the source. I think routing through =E2=80=98make_fixnum_or_float=E2=80=99 is suboptima= l.