From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcus Harnisch Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Tue, 13 Oct 2015 14:02:21 +0200 Message-ID: <87wpurht82.fsf@gmx.net> References: <561A19AB.5060001@cumego.com> <87io6dl0h0.fsf@wanadoo.es> <87lhb82qxc.fsf@gmail.com> <561BCD40.5040502@cs.ucla.edu> <22043.60385.632764.673759@turnbull.sk.tsukuba.ac.jp> 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 1444748793 27817 80.91.229.3 (13 Oct 2015 15:06:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 15:06:33 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 17:06:23 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 1Zm19i-0006sR-GD for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 17:06:22 +0200 Original-Received: from localhost ([::1]:36646 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm19h-0002sI-RJ for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 11:06:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlyHz-0007QG-M8 for emacs-devel@gnu.org; Tue, 13 Oct 2015 08:02:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlyHv-0000nr-IQ for emacs-devel@gnu.org; Tue, 13 Oct 2015 08:02:43 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:64778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlyHv-0000ne-CR for emacs-devel@gnu.org; Tue, 13 Oct 2015 08:02:39 -0400 Original-Received: from dipsy ([79.197.193.74]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0MSmNI-1aBAeG2ZrI-00RXtD; Tue, 13 Oct 2015 14:02:28 +0200 X-Face: 9LaBG,eEW^IB); =a+ebK4!}.:,ah"Uj-_AmwCi (Stephen J. Turnbull's message of "Tue\, 13 Oct 2015 02\:20\:33 +0900") User-Agent: Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b34 (linux) X-Provags-ID: V03:K0:K0m9dcqzFHTLcf5O1HozRxISvx3QsNV/PNX1+VdbpNoOnRD6okU TGTqmCs7VPjEsw9F+QxfqKRSEDL3+8sVMJs9UjYdUhl4hk65IcCf+7L9C8h/nnnzCFb02Wd asmnbUtBEIBo2iFqUQTY+IgbnHqRjjaLmqLnokWhCWDvlahBHF0+lfiYH8zSn1fZk3n/Sov KrJAJBNpOF430DQBD5TVg== X-UI-Out-Filterresults: notjunk:1;V01:K0:+IWfuNGg5Xw=:P55ixZ11gtUy677A87TtOL lZCMU56R1fvQoZ6RXNktcLyBUIUZWUNmbseSOHhNXIOXi/HtXiYoxIbWvUVPOknElRmTBcbRe NFiRXz2S8FmlU6p1Y94Dcz4uwEBvsAsbC0mOxdyu6QB98J2fqKeKOhgGZpClDN4s4iDs26Lj9 ckrxlO/S4lGFg47yE1w13t5tMBY6Tt1nMrCq3d9XvD49gVSmXMy7K4yT2WYX/d1vPRy3OxfEH G4p5qmzyMdIjtGPZuXJrb5cwdJ0wZbPcEzh6a1KO/DGg9d+dtrc542lmt0I1u/jMUIFJJogqW TujrjVRmq8nqJEhh1iNLbOgZRIJ9b1OopWXK3Zq32boUAYC/YoBvz6XkowUYA7A+DtaspXlpi 48QixvCsjaw0WjQO2vS1GZ5R5Y6SBUN91Pt5nYlGCYANrtSekHgYDIFSQyYuIXTGqEUT34rwu TbJ30snPvzV/uwPaf6l5jPBLWC5ZqckFmjIDFrJ9/h6gFIMEf9rfa9SJBgXkP8W0Hyeqdx3KX 9NIVhAh1HgpiWiHwHhXjNCNN+/WF6t22RKgwPyG31iciEauynfmJFQe5tjvuAadUKb3jhePPg xCNwD9KZinbyUf7pnEuK7NyImD6SEZ2r1ZBtUfuoWY1bizis/EnpGj6uvVa9qnSRvQ5YYVbeI FZrAeXlj5YzeUlWryk+zNs04as2Z6GFlbAjpBgQWlSMbufh1cdxu++vbopd0EnM39/N7rnWmw RY5uwv1SgTl65IfW X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 X-Mailman-Approved-At: Tue, 13 Oct 2015 10:32:59 -0400 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:191466 Archived-At: "Stephen J. Turnbull" writes: > Ben Wing did a certain kind of rewriting into C++ with XEmacs (a few > thousand lines' worth, IIRC), mostly turning typedefs for objects of > several kinds that resolve to some kind of int-ish into proper classes > that contained an int-ish member. This caught a number of bugs via > syntax errors ("this function takes an unsigned byte by the name of > Bufbyte and the actual argument is an unsigned byte by the name of > Ascbyte, so you lose!"), but more readable it isn't. Just to experiment with templates and partial specialization, I redid part of his implementation where he used tons of macros and still ended up with a lot of repetitive code for all sorts of EMACS_INT derived position types. While the template-code is arguably nicer to look at, it also helped avoiding a bug in his macro monster where invoking non-existent macro silently expanded to nothing. His much appreciated C++-based contribution appears rather conservative by todays standards, which is understandable considering the state of C++ compilers at the time of contribution (ca 2002). Given the time it would take any hypothetical C++ rewrite to mature I wouldn't even bother starting with anything less than C++2014. Another potential I would see is the availability of higher-level (STL) data structures w/o dependencies on external libraries, thus allowing Emacsen to reduce their number of home-grown data structures. Seeing comments in ancient code (I think it was related to memory allocation) that translate to something along the lines of: =E2=80=9Cthis magic number used to be value X in an even more ancient version, chosen as the result of trial-and-error on a small number of architectures at hand at the time of writing, and we have decided to increase it for totally non-scientific reasons, purely based on application of Moore's Law.=E2=80=9D make me cringe. Best regards Marcus