emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print representation of records and hash tables


From: Philipp Stephani
Subject: Re: Print representation of records and hash tables
Date: Mon, 11 Dec 2017 21:20:13 +0000



Tianxiang Xiong <address@hidden> schrieb am Mo., 11. Dez. 2017 um 11:32 Uhr:
Emacs 26 introduces records, which have a print representation 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]