emacs-devel
[Top][All Lists]
Advanced

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

Re: make-record


From: Stefan Monnier
Subject: Re: make-record
Date: Sat, 23 Dec 2017 10:53:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> So how about making 'make-record' validate the type,
> and having another function 'make-record-fast' which doesn't validate?
> I think this gets the best of both worlds.

No program uses directly `make-record` (or `record` for that matter).

They are used internally by cl-lib and eieio to implement cl-defstruct
and eieio's defclass.  So, `make-record` and `record` should be of the
"fast" kind, since the extra check can be in defclass and cl-defstruct
(where it's very cheap anyway).


        Stefan



reply via email to

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