Noam Postavsky <npostavs@users.sourceforge.net> schrieb am Mi., 13. Dez. 2017 um 02:13 Uhr:
On Tue, Dec 12, 2017 at 8:03 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> If programmers are not supposed to do it, let's detect it and report
>> an error when they try.  That way, they will know it's an error as
>> soon as they try, rather than needing to debug it to find out it's an error.
>
> Why haven't we applied that same rule to (fset 'apply ...)?
> How about (use-global-map (make-keymap))?

I thought you already agreed we should make "define an 'integer'
struct" an error, why are we still arguing about this?

https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00400.html


Even after changing defstruct, you can still use make-record to create the behavior described here:

(let ((o (make-record 'integer 0 nil)))
  (type-of o))
integer

(let ((o (make-record 'hash-table 0 nil)))
  (prin1-to-string o))
"#s(hash-table)"

My suggestion would be to either at least document this breaking change (this patch), or forbid such records, or change the return value in a non-breaking way (such as using '(record integer) and "#r(integer)").