220 4475 <CAFfXxVsAvioOtcW2+VukU=7tGgavRRjXW1X3V1Z7z+LPnXDrWg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: James Dennett <jdennett@google.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: using new keywords for more proposes
Date: Tue, 21 May 2013 23:52:21 -0700
Lines: 48
Approved: news@gmane.org
Message-ID: <CAFfXxVsAvioOtcW2+VukU=7tGgavRRjXW1X3V1Z7z+LPnXDrWg@mail.gmail.com>
References: <bb64312e-bb22-4ae4-9111-b5315d8c6449@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1369205545 28090 80.91.229.3 (22 May 2013 06:52:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 22 May 2013 06:52:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD3JZ2GYRAKRBJWW6GGAKGQENCUFFSA@isocpp.org Wed May 22 08:52:27 2013
Return-path: <std-proposals+bncBD3JZ2GYRAKRBJWW6GGAKGQENCUFFSA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f69.google.com ([209.85.219.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD3JZ2GYRAKRBJWW6GGAKGQENCUFFSA@isocpp.org>)
	id 1Uf2uO-0008OE-Bz
	for gclcip-std-proposals@m.gmane.org; Wed, 22 May 2013 08:52:24 +0200
Original-Received: by mail-oa0-f69.google.com with SMTP id i10sf8369233oag.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 21 May 2013 23:52:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:mime-version:in-reply-to:references:date:message-id
         :subject:from:to:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=BURISbDzVSvlUlmOPhWia2lr0DRI1U2CEzFEcd3xgLo=;
        b=gPahT464m6tOCtDb2sRlzJPVNIlC0ufLrHa/LOCGRsR/IYt5vQbMvYaVbxihRDZ5+r
         US9R3vY9/bJqc2YVOshmEdtvM8fJ083QMW91VkhBQBQvLNtEqren3g5S6vt9SfsFMJ2O
         /icoTJjf70VD+yqtZUSWB0/Z4p62sQN0MveppLh1uVrEQ6jvJ7/QhNYH0TR38oNhq+i/
         6wUtM6AbWjsJWstG5IN3s5e6Lv97ozMDOmwy+Qj+k9+ovHcd3n2m/mbIUrWxKZPsvUcg
         aOd6miQOzRkffk4SyjGQAE/qRJtni0llqWiPWM7h5HayJRUqo332zgU5xyGRodoWH5rY
         3Rww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:mime-version:in-reply-to:references:date:message-id
         :subject:from:to:x-gm-message-state:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=BURISbDzVSvlUlmOPhWia2lr0DRI1U2CEzFEcd3xgLo=;
        b=YJ58fX1nzZJvd9phlmC/J10svvHRq2uCE61mdh7tqp1HTtpKs7Ga9mIiZ+XMy11k16
         LxjrePYCBE6BBwDPSnXgHNyS5mTSv74GoC9rjbMo7tqgxR945sj/uencugr0zg9Ts23e
         8abukC9BlXKdAUuEbDYJpv+ckL/q3l1EE7QePrL51xc1B77fQqEeVHvdSEeOQ8KU4IkM
         qkHJrr7V4w3Z1CBx/iblQhoX4oVbZqhi89CYfdqc382yU0lsCP2AF3ajH4oVAg41+dAu
         GfSKvVVfwD0c3XcGNBCfJhLCY7CJV/T9JR3ZsMjBH75R/U6ZlCDeO2pqNgBrHu+u8/ss
         t1EA==
X-Received: by 10.182.236.231 with SMTP id ux7mr1863697obc.5.1369205543311;
        Tue, 21 May 2013 23:52:23 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.24.201 with SMTP id w9ls209438obf.49.gmail; Tue, 21 May
 2013 23:52:22 -0700 (PDT)
X-Received: by 10.60.84.102 with SMTP id x6mr3828253oey.73.1369205542186;
        Tue, 21 May 2013 23:52:22 -0700 (PDT)
Original-Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [2607:f8b0:4001:c03::22f])
        by mx.google.com with ESMTPS id do5si3651826oeb.27.2013.05.21.23.52.22
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 21 May 2013 23:52:22 -0700 (PDT)
Received-SPF: pass (google.com: domain of jdennett@google.com designates 2607:f8b0:4001:c03::22f as permitted sender) client-ip=2607:f8b0:4001:c03::22f;
Original-Received: by mail-ie0-f175.google.com with SMTP id s9so4297955iec.6
        for <std-proposals@isocpp.org>; Tue, 21 May 2013 23:52:21 -0700 (PDT)
X-Received: by 10.42.155.202 with SMTP id v10mr3306099icw.2.1369205541752;
 Tue, 21 May 2013 23:52:21 -0700 (PDT)
Original-Received: by 10.231.15.69 with HTTP; Tue, 21 May 2013 23:52:21 -0700 (PDT)
In-Reply-To: <bb64312e-bb22-4ae4-9111-b5315d8c6449@isocpp.org>
X-Gm-Message-State: ALoCoQmQkK+kPofO6CEGsH3T/mi/779ez5FIxpU1wg9Iz2Mn+wAXgQVgb9Sr9ixWuOG+KFGWJsA4Yr1UHGRfcWqOzKmO8VB7VeFkW6UDNRjSyxnAuspYluW0oUiZ99YJaWA/sj2VqcQMobKfQ1VgWgZjPZCly3oJftR1EdvrO0CImKS1uJtS97vQ+4GoLR0xIfuMI4weosIG
X-Original-Sender: jdennett@google.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jdennett@google.com designates 2607:f8b0:4001:c03::22f as permitted
 sender) smtp.mail=jdennett@google.com;       dkim=pass header.i=@google.com;
       dmarc=pass (p=REJECT dis=none) d=google.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4475
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4475>

On Tue, May 21, 2013 at 11:31 PM, Ran Regev <regev.ran@gmail.com> wrote:
>
> Hello,
>
> Can anyone point me to the discussion on "why not defining new keywords as
> 'real' keywords"?

It's discussed with almost horrible frequency, but mostly not in
writing in public forums I'd guess.

The short version: it breaks existing code that uses them as
identifiers, and the C++ committee is (believe it or not) somewhat
strongly averse to breaking existing working code.

(Personally I'd prefer to add more keywords; fixing up the resulting
problems is worthwhile in my opinion.)

> For example, why can 'final' be used as a variable?
> Surely it causes problems:
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3539.html#1318

Breaking all of the code that uses "final" as an identifier would also
cause problems.  As with almost all things, it's a trade-off, not a
good vs bad decision.  (In my limited checks, there are actually far
more uses of "override" than "final", but both are used somewhat
frequently in real C++98 code.)

In this particular case, there was pre-existing experience from
C++/CLI that using contextual keywords for these was workable -- and
the C++ committee does give some weight to implementation/usage
experience.

You might notice that the keywords added in C++11 are often rather
obscure: e.g., "nullptr" instead of "null".  A significant part of the
reason for that is to avoid clashes with existing code.

-- James

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



.
