From: Philipp Stephani <p.stephani2@gmail.com>
To: Tianxiang Xiong <tianxiang.xiong@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Print representation of records and hash tables
Date: Mon, 11 Dec 2017 21:20:13 +0000 [thread overview]
Message-ID: <CAArVCkR7m8Bp3HaY6qiwPu-E+9P335zWb8ShvGOYeWTNGLEpbg@mail.gmail.com> (raw)
In-Reply-To: <CACMkxizkzFEJXdyt2iHuL5A=xH4bc1zoawtxfTLNB6xrM-u9Sg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
Tianxiang Xiong <tianxiang.xiong@gmail.com> schrieb am Mo., 11. Dez. 2017
um 11:32 Uhr:
> Emacs 26 introduces records, which have a print representation
> <http://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/records.texi#n27>
> starting with `#s`, followed by a list of contents.
>
> This seems similar to the print representation of hash tables:
>
> (make-hash-table)
> ;; => #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8
> data ( ...))
>
> Is this merely "coincidence", or is there some deeper meaning? If not,
> isn't it confusing to have two different objects w/ such similar print
> representations?
>
Yes, it's confusing, and I'm very much against it. Interpretation of ELisp
code (even compiled code) now changes in a very subtle manner depending on
whether a record named `hash-table` happens to be defined or not.
[-- Attachment #2: Type: text/html, Size: 1265 bytes --]
next prev parent reply other threads:[~2017-12-11 21:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 10:32 Print representation of records and hash tables Tianxiang Xiong
2017-12-11 21:20 ` Philipp Stephani [this message]
2017-12-12 15:21 ` Stefan Monnier
2017-12-12 17:12 ` Ted Zlatanov
2017-12-12 20:22 ` Stefan Monnier
2017-12-14 3:33 ` Tianxiang Xiong
2017-12-14 14:19 ` Stefan Monnier
2017-12-14 5:22 ` Ted Zlatanov
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=CAArVCkR7m8Bp3HaY6qiwPu-E+9P335zWb8ShvGOYeWTNGLEpbg@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=tianxiang.xiong@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.