From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Mon, 12 Oct 2015 19:29:25 +0300 Message-ID: <831td0oxsq.fsf@gnu.org> References: <561A19AB.5060001@cumego.com> <87io6dl0h0.fsf@wanadoo.es> <87lhb82qxc.fsf@gmail.com> <878u78b3hg.fsf@fencepost.gnu.org> <87h9lwyv33.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1444667401 32390 80.91.229.3 (12 Oct 2015 16:30:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 16:30:01 +0000 (UTC) Cc: ofv@wanadoo.es, dak@gnu.org, emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 12 18:29:52 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 1Zlfyu-0005Td-GB for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 18:29:48 +0200 Original-Received: from localhost ([::1]:56536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlfyu-0007If-0V for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 12:29:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlfyS-00076D-Gy for emacs-devel@gnu.org; Mon, 12 Oct 2015 12:29:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlfyR-0005aw-Lh for emacs-devel@gnu.org; Mon, 12 Oct 2015 12:29:20 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:42066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlfyO-0005Z6-8w; Mon, 12 Oct 2015 12:29:16 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NW400O0080B4J00@mtaout25.012.net.il>; Mon, 12 Oct 2015 19:26:44 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NW400KLE8CKEY40@mtaout25.012.net.il>; Mon, 12 Oct 2015 19:26:44 +0300 (IDT) In-reply-to: <87h9lwyv33.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 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:191366 Archived-At: > From: Oleh Krehel > Date: Mon, 12 Oct 2015 17:17:52 +0200 > Cc: =D3scar Fuentes , emacs-devel@gnu.org >=20 > # define MIN(a,b) ((a) < (b) ? (a) : (b)) > #define streq(X, Y) (*(X) =3D=3D *(Y) && strcmp ((X) + 1, (Y) += 1) =3D=3D 0) > #define SET_FLAG(F, FLAG)=09((F) |=3D (FLAG)) > #define HAS_FLAG(F, FLAG)=09(((F) & (FLAG)) !=3D 0) > #define xnew(n, Type) ((Type *) xmalloc ((n) * sizeof (Typ= e))) > #define xrnew(op, n, Type) ((op) =3D (Type *) xrealloc (op, (n)= * sizeof (Type))) > #define switch_line_buffers() (curndx =3D 1 - curndx) > #define curlinepos (lbs[curndx].linepos) > #define BVAR(buf, field) ((buf)->field ## _) >=20 > Some of these can be replaced with plain type checked C++ > functions. Others can be replaced with templated C++ functions, tha= t are > still type checked. Still others with public getters and setters. Yes, but why should they be replaced? Isn't it clear what SET_FLAG does, just from its name?