From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Mon, 19 Oct 2015 13:31:54 +0200 Message-ID: <87k2qjjdqt.fsf@fencepost.gnu.org> References: <561A19AB.5060001@cumego.com> <83zizi3qr0.fsf@gnu.org> <87lhb1n81y.fsf@gnu.org> <83si594wt3.fsf@gnu.org> <87io64iigs.fsf@gnu.org> <87r3kso1gr.fsf@fencepost.gnu.org> <87wpuks5ek.fsf@T420.taylan> <83vba4i1z3.fsf@gnu.org> <87pp0cqgjf.fsf@T420.taylan> <83twpoi0sp.fsf@gnu.org> <878u70qf75.fsf@T420.taylan> <83mvvghydi.fsf@gnu.org> <5623E3B5.8050407@dancol.org> <87y4f0kos9.fsf@fencepost.gnu.org> <5623EAB2.5000008@dancol.org> <87pp0cotqd.fsf@T420.taylan> <5623F7E2.3010200@dancol.org> <87d1wbp9uv.fsf@T420.taylan> <22052.51982.9833.353851@turnbull.sk.tsukuba.ac.jp> <83bnbvgm39.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445254357 16070 80.91.229.3 (19 Oct 2015 11:32:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 11:32:37 +0000 (UTC) Cc: taylanbayirli@gmail.com, "Stephen J. Turnbull" , dancol@dancol.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 13:32:27 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zo8fw-00027S-Uq for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 13:32:25 +0200 Original-Received: from localhost ([::1]:38388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo8fw-0000iM-B6 for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 07:32:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo8fe-0000i8-U5 for emacs-devel@gnu.org; Mon, 19 Oct 2015 07:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo8fd-0004Gt-QQ for emacs-devel@gnu.org; Mon, 19 Oct 2015 07:32:06 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo8fU-0004Dc-Dc; Mon, 19 Oct 2015 07:31:56 -0400 Original-Received: from localhost ([127.0.0.1]:51617 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zo8fT-0003oS-Fl; Mon, 19 Oct 2015 07:31:55 -0400 Original-Received: by lola (Postfix, from userid 1000) id D19BBDF46D; Mon, 19 Oct 2015 13:31:54 +0200 (CEST) In-Reply-To: <83bnbvgm39.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Oct 2015 13:59:54 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192075 Archived-At: Eli Zaretskii writes: >> Date: Mon, 19 Oct 2015 19:50:53 +0900 >> From: "Stephen J. Turnbull" >> Cc: Daniel Colascione , David Kastrup , >> emacs-devel@gnu.org >>=20 >> Taylan Ulrich Bay=C4=B1rl=C4=B1 /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. >>=20 >> It does. It tells us that RMS doesn't like abstract data types. > > Reality check: > > fgrep -Rw defstruct lisp --include=3D"*.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 v= alue) 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\" packag= e. lisp/mh-e/mh-acros.el:The `defstruct' in the \"cl\" library produces compil= er warnings, lisp/mh-e/mh-acros.el:describes the various structure fields. Lookup `defst= ruct' for lisp/mh-e/mh-loaddefs.el:(autoload 'mh-defstruct "mh-acros" "\ lisp/mh-e/mh-loaddefs.el:Replacement for `defstruct' from the \"cl\" packag= e. lisp/mh-e/mh-loaddefs.el:The `defstruct' in the \"cl\" library produces com= piler warnings, lisp/mh-e/mh-loaddefs.el:describes the various structure fields. Lookup `de= fstruct' for lisp/mh-e/mh-thread.el:(mh-defstruct (mh-thread-message (:conc-name mh-mess= age-) lisp/mh-e/mh-thread.el:(mh-defstruct (mh-thread-container (:conc-name mh-co= ntainer-) 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-ma= ke-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) :n= amed) 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 com= pilation-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 defin= ed in cl-macs.el cl-defstruct lisp/progmodes/elisp-mode.el: ;; cl-defstruct, so return the l= ocation of the cl-defstruct. lisp/progmodes/elisp-mode.el: 'cl-defs= truct 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-crea= te-backend) --=20 David Kastrup