[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs rewrite in a maintainable language
From: |
Oleh Krehel |
Subject: |
Re: Emacs rewrite in a maintainable language |
Date: |
Mon, 12 Oct 2015 14:48:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Óscar Fuentes <address@hidden> writes:
> Replacing C with a language that helps people to write readable, safe,
> efficient and maintainable code without having to study the existing
> code base for months looks quite appealing to me. That replacement could
> be gradual (no "stopping the world while The Big Rewrite is underway.")
> If that language is not so popular as C, that's no big problem as long
> as it makes things less daunting for those willing to work on the Emacs
> core. As already said, there is no dramatic shortage of people who learn
> Elisp just for hacking Emacs.
I think slowly moving the Emacs C core to C++ is a good idea. The two
languages are supposed to be largely compile-compatible, i.e. g++ can
understand what was meant for gcc.
I've been trying to get into understanding Emacs C core, but it's just
so hard with all those macros around. I think even replacing `#define`
with `const` would be a huge improvement, worthwhile of the switch. The
second step would be to replace some macros with type checked template
functions. Finally, write proper classes for buffer/window/frame/font
etc. Nothing too complex like virtual functions, operator overloading or
hardcore template meta-programming that puts people off C++, just basic
encapsulation to see which code uses what and the type of data being
operated on.
I don't have sufficient C/C++ experience to initiate this change. But
if someone were to lead, I'd help as much as I could.
If other people and the new maintainer were to support the C -> C++
move, the change could be very gradual, with a lot of functions not
changing at all. In an ideal world, the change would be initiated by
e.g. deciding to use C++11 and swapping `cc` for `g++` in the Makefiles,
without changing the code at all. Of course it's never as simple as
that.
Oleh
- Re: Emacs rewrite in a maintainable language, (continued)
- Re: Emacs rewrite in a maintainable language, Eli Zaretskii, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Paul Eggert, 2015/10/15
- Re: Emacs rewrite in a maintainable language, Steinar Bang, 2015/10/15
- Re: Emacs rewrite in a maintainable language, Marcin Borkowski, 2015/10/12
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Richard Stallman, 2015/10/15
- Re: Emacs rewrite in a maintainable language, Rustom Mody, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Michael Heerdegen, 2015/10/12
- Re: Emacs rewrite in a maintainable language, John Wiegley, 2015/10/11
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/12
- Re: Emacs rewrite in a maintainable language,
Oleh Krehel <=
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Oleh Krehel, 2015/10/12
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Eli Zaretskii, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Paul Eggert, 2015/10/12
- Re: Emacs rewrite in a maintainable language, Oleh Krehel, 2015/10/15
- Re: Emacs rewrite in a maintainable language, Alan Mackenzie, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Eli Zaretskii, 2015/10/13
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Oleh Krehel, 2015/10/15