emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs rewrite in a maintainable language


From: Óscar Fuentes
Subject: Re: Emacs rewrite in a maintainable language
Date: Sun, 11 Oct 2015 20:32:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"John Wiegley" <address@hidden> writes:

>>>>>> Przemysław Wojnowski <address@hidden> writes:
>
>> Recently I was going through Emacs C code and immediately one thing come to
>> my mind: "Did anyone consider rewrite it a more maintainable language?" :-)
>
> Hi Przemysław,
>
> There is one reason I can think of not to rewrite Emacs in another language:
> Because the language it's written in is working for us.
>
> If C presented difficulties in terms of capability, efficiency, contribution,
> debugging, etc., that would naturally drive us toward another language. But as
> it stands, C is well understood, easy to resolve performance issues, there are
> superb debugging and analysis tools available, and the runtime is exceedingly
> mature.
>
> And, as some have said, C code represents only a fraction of what Emacs is to
> the user. Switching from Emacs Lisp to another high-level language might be a
> more interesting discussion, which you could take up with the people working
> on such projects, like Guile Emacs. If someone can prove to me that we gain a
> lot and lose a little from such a switch, it's definitely worth considering!

We have plenty of people writing Elisp code, either for the Emacs core,
packages distributed with the core or ELPA, or external packages.
However, the number of people able of doing significant work on the C
core is tiny. By your depiction of C, this is backwards: the popular
language has a few contributors, the application-specific language is
well populated.

The truth is that the C core is an obfuscated mess (ok ok, now someone
will come saying that the Emacs C code base is very well and all;
someone who surely has at least 10 years of experience with the C core.)

I wouldn't touch the C core with a ten foot pole, except for something
that is an obvious change, and then request a review by a veteran. I
know C, I have many years of C++ experience, but the Emacs C core is a
pseudo-language on itself, because C sucks at abstracting things. It
sucks too at helping the hacker to not shoot himself on the foot.

In large part because that reason, there are key are parts of the C core
that are only understood by one active hacker (being optimistic here).
This is a huge liability for Emacs. I don't know how this fact fits the
"C is working for us" stance.

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]