|
From: | Paul Eggert |
Subject: | Re: Emacs rewrite in a maintainable language |
Date: | Mon, 12 Oct 2015 08:09:52 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
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!)
[Prev in Thread] | Current Thread | [Next in Thread] |