emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs rewrite in a maintainable language


From: David Kastrup
Subject: Re: Emacs rewrite in a maintainable language
Date: Mon, 19 Oct 2015 13:31:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> Date: Mon, 19 Oct 2015 19:50:53 +0900
>> From: "Stephen J. Turnbull" <address@hidden>
>> Cc: Daniel Colascione <address@hidden>, David Kastrup <address@hidden>,
>>      address@hidden
>> 
>> Taylan Ulrich Bayırlı        /Kammer writes:
>>  > I've heard bad things about both defstruct and EIEIO for different
>>  > reasons.  The fact that most Elisp code is shy of using even defstruct
>>  > should tell us something.
>> 
>> It does.  It tells us that RMS doesn't like abstract data types.
>
> Reality check:
>
>   fgrep -Rw defstruct lisp --include="*.el" | wc
>       172     815   12631

That's 172 lines with occurences of defstruct (which usually occurs once
per line, but since those lines have also a file name and other words,
the second number appears to signify more than there is).

Here is the output of the above fgrep command until the actual use of a
native defstruct outside of a comment (I think we can savely assume that
RMS would not really use cl-defstruct as he is not known to be a fan of
cl):

lisp/url/url-queue.el:(cl-defstruct url-queue
lisp/url/url-parse.el:(cl-defstruct (url
lisp/url/url-future.el:;; Make a url-future (basically a defstruct):
lisp/url/url-future.el:(cl-defstruct url-future callback errorback status value)
lisp/url/url-cookie.el:(cl-defstruct (url-cookie
lisp/textmodes/rst.el:;;        `defstruct'.
lisp/textmodes/rst.el:;; FIXME: Return value should be a `defstruct'.
lisp/textmodes/rst.el:;; FIXME: Return value should be a `defstruct'.
lisp/textmodes/sgml-mode.el:(cl-defstruct (sgml-tag
lisp/mh-e/mh-acros.el:(defmacro mh-defstruct (name-spec &rest fields)
lisp/mh-e/mh-acros.el:  "Replacement for `defstruct' from the \"cl\" package.
lisp/mh-e/mh-acros.el:The `defstruct' in the \"cl\" library produces compiler 
warnings,
lisp/mh-e/mh-acros.el:describes the various structure fields. Lookup 
`defstruct' for
lisp/mh-e/mh-loaddefs.el:(autoload 'mh-defstruct "mh-acros" "\
lisp/mh-e/mh-loaddefs.el:Replacement for `defstruct' from the \"cl\" package.
lisp/mh-e/mh-loaddefs.el:The `defstruct' in the \"cl\" library produces 
compiler warnings,
lisp/mh-e/mh-loaddefs.el:describes the various structure fields. Lookup 
`defstruct' for
lisp/mh-e/mh-thread.el:(mh-defstruct (mh-thread-message (:conc-name mh-message-)
lisp/mh-e/mh-thread.el:(mh-defstruct (mh-thread-container (:conc-name 
mh-container-)
lisp/mh-e/mh-mime.el:(mh-defstruct (mh-buffer-data (:conc-name mh-mime-)
lisp/profiler.el:(cl-defstruct (profiler-profile (:type vector)
lisp/profiler.el:(cl-defstruct (profiler-calltree (:constructor 
profiler-make-calltree))
lisp/progmodes/ebrowse.el:(cl-defstruct (ebrowse-hs (:type vector) :named)
lisp/progmodes/ebrowse.el:(cl-defstruct (ebrowse-ts (:type vector) :named)
lisp/progmodes/ebrowse.el:(cl-defstruct (ebrowse-bs (:type vector) :named)
lisp/progmodes/ebrowse.el:(cl-defstruct (ebrowse-cs (:include ebrowse-bs) 
(:type vector) :named)
lisp/progmodes/ebrowse.el:(cl-defstruct (ebrowse-ms (:include ebrowse-bs) 
(:type vector) :named)
lisp/progmodes/ebrowse.el:(cl-defstruct (ebrowse-position (:type vector) :named)
lisp/progmodes/flymake.el:(cl-defstruct (flymake-ler
lisp/progmodes/compile.el:;; (cl-defstruct (compilation--loc
lisp/progmodes/compile.el:;; FIXME: We don't use a defstruct because of 
compilation-assq which looks up
lisp/progmodes/compile.el:(cl-defstruct (compilation--message
lisp/progmodes/js.el:(cl-defstruct (js--pitem (:type list))
lisp/progmodes/js.el:(cl-defstruct js--js-handle
lisp/progmodes/elisp-mode.el:                   ;; This doc string is defined 
in cl-macs.el cl-defstruct
lisp/progmodes/elisp-mode.el:              ;; cl-defstruct, so return the 
location of the cl-defstruct.
lisp/progmodes/elisp-mode.el:                                      'cl-defstruct
lisp/progmodes/elisp-mode.el:(cl-defstruct (xref-elisp-location
lisp/progmodes/gdb-mi.el:(cl-defstruct gdb-handler
lisp/progmodes/gdb-mi.el:(cl-defstruct gdb-table
lisp/tar-mode.el:(cl-defstruct (tar-header
lisp/org/ox.el:(defstruct (org-export-backend (:constructor 
org-export-create-backend)


-- 
David Kastrup



reply via email to

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