From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Mon, 12 Oct 2015 08:09:52 -0700 Organization: UCLA Computer Science Department Message-ID: <561BCD40.5040502@cs.ucla.edu> References: <561A19AB.5060001@cumego.com> <87io6dl0h0.fsf@wanadoo.es> <87lhb82qxc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1444662631 15159 80.91.229.3 (12 Oct 2015 15:10:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 15:10:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 12 17:10: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 1Zlek2-0003a2-0Q for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 17:10:22 +0200 Original-Received: from localhost ([::1]:55987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlek1-00042O-N6 for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 11:10:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlejk-0003co-M9 for emacs-devel@gnu.org; Mon, 12 Oct 2015 11:10:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlejg-00025k-HU for emacs-devel@gnu.org; Mon, 12 Oct 2015 11:10:04 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlejg-00025d-CA for emacs-devel@gnu.org; Mon, 12 Oct 2015 11:10:00 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 801BB160E31; Mon, 12 Oct 2015 08:09:59 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LccRf3ufKIPC; Mon, 12 Oct 2015 08:09:58 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CAB37160E2F; Mon, 12 Oct 2015 08:09:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4_hX5rW4vuTO; Mon, 12 Oct 2015 08:09:58 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B1A4A160E28; Mon, 12 Oct 2015 08:09:58 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <87lhb82qxc.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:191348 Archived-At: On 10/12/2015 05:48 AM, Oleh Krehel wrote: > I've been trying to get into understanding Emacs C core, but it's just > so hard with all those macros around. I dislike those macros too, and have gotten rid of more than my share of them, typically replacing them with inline functions (e.g., XFLOAT) or with enum constants (e.g., BITS_PER_CHAR). Much more work could be done in this area. This part largely doesn't need C++, and the few places where it might benefit from C++ typically require so much C++ foo that it's not clear it's worth the hassle. I suppose the main advantage of C++ over C, for something like the Emacs core, would be encapsulation. But here again, it's not clear that C++ would be enough of a win. The ways in which the Emacs core are poorly encapsulated are largely independent of C vs C++. Changing it to be better-encapsulated C++ would not be that much of a win over changing the current Emacs to be better-encapsulated C. Of course all of this is sheer speculation. I haven't attempted rewriting major sections of the Emacs core into C++ and I suspect nobody else has either. Until that is attempted, we're just guessing. (And I'm not volunteering!)