From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Sun, 11 Oct 2015 20:32:59 +0200 Message-ID: <87io6dl0h0.fsf@wanadoo.es> References: <561A19AB.5060001@cumego.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1444588444 7746 80.91.229.3 (11 Oct 2015 18:34:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Oct 2015 18:34:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 11 20:33:51 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 1ZlLRN-00016j-EU for ged-emacs-devel@m.gmane.org; Sun, 11 Oct 2015 20:33:49 +0200 Original-Received: from localhost ([::1]:49370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlLRM-0003nB-LS for ged-emacs-devel@m.gmane.org; Sun, 11 Oct 2015 14:33:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlLQt-0003m9-5V for emacs-devel@gnu.org; Sun, 11 Oct 2015 14:33:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlLQp-0006Yz-UG for emacs-devel@gnu.org; Sun, 11 Oct 2015 14:33:19 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlLQp-0006Ys-Ns for emacs-devel@gnu.org; Sun, 11 Oct 2015 14:33:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZlLQn-0000Vc-BQ for emacs-devel@gnu.org; Sun, 11 Oct 2015 20:33:13 +0200 Original-Received: from 198.red-83-32-113.dynamicip.rima-tde.net ([83.32.113.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Oct 2015 20:33:13 +0200 Original-Received: from ofv by 198.red-83-32-113.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Oct 2015 20:33:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 198.red-83-32-113.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:GDcWndpGteCT0i6vVaaDmk6vp5I= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:191255 Archived-At: "John Wiegley" writes: >>>>>> Przemysław Wojnowski 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.