From: Wolfgang Jenkner <wjenkner@inode.at>
To: Stefan <monnier@iro.umontreal.ca>
Cc: Paul Eggert <eggert@cs.ucla.edu>,
Oleh Krehel <oleh.krehel@gmail.com>,
emacs-devel@gnu.org
Subject: Re: Elisp / C inconsistency for reading "1."
Date: Sat, 15 Mar 2014 17:21:26 +0100 [thread overview]
Message-ID: <85vbvf8m3j.fsf@iznogoud.viz> (raw)
In-Reply-To: jwvvbvg919k.fsf-monnier+emacs@gnu.org
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
next prev parent reply other threads:[~2014-03-15 16:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 12:13 Elisp / C inconsistency for reading "1." Oleh Krehel
2014-03-14 14:30 ` Paul Eggert
2014-03-14 16:46 ` Stefan
2014-03-15 16:21 ` Wolfgang Jenkner [this message]
2014-03-15 16:43 ` David Kastrup
2014-03-15 18:39 ` Simon Leinen
2014-03-16 1:31 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85vbvf8m3j.fsf@iznogoud.viz \
--to=wjenkner@inode.at \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=oleh.krehel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.