From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Tue, 13 Oct 2015 12:21:20 +0000 Message-ID: <20151013122120.GB4613@acm.fritz.box> References: <561A19AB.5060001@cumego.com> <87io6dl0h0.fsf@wanadoo.es> <87lhb82qxc.fsf@gmail.com> <878u78b3hg.fsf@fencepost.gnu.org> <87h9lwyv33.fsf@gmail.com> <561C368F.6010306@cs.ucla.edu> <87oag3xb2i.fsf@gmail.com> <20151013114630.GA4613@acm.fritz.box> <87io6bou1j.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1444738903 17765 80.91.229.3 (13 Oct 2015 12:21:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 12:21:43 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 14:21:34 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 1ZlyaA-0001F5-Q3 for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 14:21:30 +0200 Original-Received: from localhost ([::1]:34221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlyaA-0005DU-66 for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 08:21:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlyYd-00044V-OK for emacs-devel@gnu.org; Tue, 13 Oct 2015 08:19:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlyYX-0006Ac-Oa for emacs-devel@gnu.org; Tue, 13 Oct 2015 08:19:55 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:19944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlyYX-00069j-Eq for emacs-devel@gnu.org; Tue, 13 Oct 2015 08:19:49 -0400 Original-Received: (qmail 93571 invoked by uid 3782); 13 Oct 2015 12:19:47 -0000 Original-Received: from acm.muc.de (p579E9DA0.dip0.t-ipconnect.de [87.158.157.160]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 13 Oct 2015 14:19:45 +0200 Original-Received: (qmail 5921 invoked by uid 1000); 13 Oct 2015 12:21:20 -0000 Content-Disposition: inline In-Reply-To: <87io6bou1j.fsf@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.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:191451 Archived-At: Hello, Oleh. On Tue, Oct 13, 2015 at 02:02:48PM +0200, Oleh Krehel wrote: > Alan Mackenzie writes: > > On Tue, Oct 13, 2015 at 01:27:49PM +0200, Oleh Krehel wrote: > >> May I ask if there's a reason to not have a single style for const > >> pointers? I get 2162 occurrences of "const char *", and 357 occurrences > >> of "char const *" in the C sources. > > Yes there is. The two are semantically different. In one of them, it is > > the pointer which is declared constant. In the other, it's what's > > pointed at that's constant. Though I can never remember which is which. > > :-( > Hi Alan, > Actually, "const char *" and "char const *" are absolutely equivalent in > all regards, both in C and C++. > I think you meant the difference between "const char *" and "char * const". Yes, you're right. Sorry about that. It's one of the few flaws in C's syntax that there are here two confusing ways of writing the same thing. > For exactly this reason (the confusion over 3 notations, 2 of which are > the same), I propose that we stick only to "const char *" and "char * const", > and don't use "char const *". No disagreement here. But the deprecated form will keep creeping back, over the coming years. > Oleh -- Alan Mackenzie (Nuremberg, Germany).