emacs-devel
[Top][All Lists]
Advanced

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

type-of semantics unclear for records


From: Paul Eggert
Subject: type-of semantics unclear for records
Date: Tue, 4 Apr 2017 15:12:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

The recently-changed behavior of 'type-of' causes it to disagree with its documentation when the type of a record is itself a record. For example, the documentation implies that (eq X (type-of (record X))) should be t for all X, but this is not the case when X is (record 'a 'b), because in this case (type-of (record X)) returns b.

I assume the behavior is intended to support subclassing of some sort; if so the subclassing should be documented (or at least the doc should say that behavior is undefined if the record type is not a symbol), and if not the behavior should be changed to agree with the doc.




reply via email to

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