220 2328 <CAOHCbitNLDK_yY64ssrJQ87a27Ys2gV320ThAKuaDaMNLK9wTQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: optional<T>, one more value or two states
Date: Sun, 27 Jan 2013 00:34:59 -0500
Lines: 79
Approved: news@gmane.org
Message-ID: <CAOHCbitNLDK_yY64ssrJQ87a27Ys2gV320ThAKuaDaMNLK9wTQ@mail.gmail.com>
References: <CAGsORuC1ADLXgS9AZZiTo=knmhT-+9Yj+82v+b8Nq_WJpb1fOg@mail.gmail.com>
	<CAFk2RUZyZA0LLUNuVNcnibv+qBF69jMytWQL3tkp-Kp21oEU+A@mail.gmail.com>
	<CAGsORuB-Qkx-LaXj2jO4yLrwN524kiJONSg7oczkQZHYaJ6ASg@mail.gmail.com>
	<d360a952-28ae-4d57-bb20-96fd08725a0b@isocpp.org>
	<CAPXezF_JggyMaXjGS9r1EAGVu1NhQBEyGEXB8tKmVqgFfjoCeg@mail.gmail.com>
	<CALJmx62zJd_tZ=XYL7TaSkRN6432SObwH9YS87eLX-h_pMuFYQ@mail.gmail.com>
	<CAOHCbivAK0ypmMhrhJ3zKpF8BHu3h_rUNzeao-HnibJkC-qqGw@mail.gmail.com>
	<ef15483d-5665-4da3-9b79-aefd3c725e1b@isocpp.org>
	<CAOHCbithEUfm+w_06V71=hpkqGUJvqiyDFqD7fesfgLy4uUieg@mail.gmail.com>
	<2c2b9360-8e5e-422d-9b85-124bd947b004@isocpp.org>
	<CAOHCbivJzdQbe22URgRuahCYYDPG8Ygsc4VG7f61zRBWXogekg@mail.gmail.com>
	<4f505b21-669a-4ef0-95b9-edf9e5afa22d@isocpp.org>
	<36691ed8-3c44-4eb5-885f-27067fce7f40@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 1359264902 3991 80.91.229.3 (27 Jan 2013 05:35:02 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 27 Jan 2013 05:35:02 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUZ5QWKNQIIJ6MSRACRUBBPXHCE4@isocpp.org Sun Jan 27 06:35:22 2013
Return-path: <std-proposals+bncBCUZ5QWKNQIIJ6MSRACRUBBPXHCE4@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vb0-f71.google.com ([209.85.212.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIIJ6MSRACRUBBPXHCE4@isocpp.org>)
	id 1TzKtj-0000ax-Hq
	for gclcip-std-proposals@m.gmane.org; Sun, 27 Jan 2013 06:35:19 +0100
Original-Received: by mail-vb0-f71.google.com with SMTP id p1sf2400717vbi.6
        for <gclcip-std-proposals@m.gmane.org>; Sat, 26 Jan 2013 21:35:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :mime-version:x-received: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=rg9s5vFPPr/sKGpfErf4Ngd6c/CIhXkSvwcvvptDF+A=;
        b=eMVeWIZtZW7Cnb+7j0Bp1M26BurFPxb0kTkHD0v5dkx4RzrOAfeCqggAICb0DRsOC8
         gcHBkyk7/PCE396QgT12qYHbB/aVd1gcEwhudMXHy7SmXd4MudwMFVj5rVsI3uCBVQDh
         EIyFo+8p2S9CgGdsK87w9HP1WbcZnk9ny88gpDLCNERk1vOENNQxqKTISLzP5uYR0ata
         JhYxYCj1EJnYJa6jgaK0eBpuUjfXW0MDstf7hogfKhqdcTxZyldY8MDXnKOPGJ5hJRfH
         gDWZwwOpoGe+g5ssFTaCy5azFRzaK7WcSXER7hIO8w6XxkJac 
X-Received: by 10.224.60.6 with SMTP id n6mr4830489qah.8.1359264901023;
        Sat, 26 Jan 2013 21:35:01 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.30.36 with SMTP id p4ls666912qeh.74.gmail; Sat, 26 Jan 2013
 21:34:59 -0800 (PST)
X-Received: by 10.49.61.37 with SMTP id m5mr13447877qer.12.1359264899925;
        Sat, 26 Jan 2013 21:34:59 -0800 (PST)
X-Received: by 10.49.61.37 with SMTP id m5mr13447875qer.12.1359264899878;
        Sat, 26 Jan 2013 21:34:59 -0800 (PST)
Original-Received: from mail-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171])
        by mx.google.com with ESMTPS id r17si139546qct.199.2013.01.26.21.34.59
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 26 Jan 2013 21:34:59 -0800 (PST)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.216.171 as permitted sender) client-ip=209.85.216.171;
Original-Received: by mail-qc0-f171.google.com with SMTP id d1so839273qca.30
        for <std-proposals@isocpp.org>; Sat, 26 Jan 2013 21:34:59 -0800 (PST)
X-Received: by 10.49.12.138 with SMTP id y10mr13041751qeb.64.1359264899663;
 Sat, 26 Jan 2013 21:34:59 -0800 (PST)
Original-Received: by 10.49.87.168 with HTTP; Sat, 26 Jan 2013 21:34:59 -0800 (PST)
In-Reply-To: <36691ed8-3c44-4eb5-885f-27067fce7f40@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of tvaneerd@gmail.com designates 209.85.216.171 as permitted sender)
 smtp.mail=tvaneerd@gmail.com;       dkim=pass header.i=@gmail.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:2328
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2328>

On Sat, Jan 26, 2013 at 5:09 AM, Vladimir Batov <vb.mail.247@gmail.com> wrote:
> On Saturday, January 26, 2013 10:22:11 AM UTC+11, Nicol Bolas wrote:
>>
>> On Friday, January 25, 2013 2:09:20 PM UTC-8, Tony V E wrote:
>>>
>>> On Fri, Jan 25, 2013 at 3:20 PM, Nicol Bolas <jmck...@gmail.com> wrote:
>>> > ...
>>> Do you think we should back away from all the pointer-ish interface
>>> parts and move more towards container-ish?
>
>
> "We" are reading the 3rd revision of the document describing the facility
> which has been in heavy use for a while and which has already been submitted
> for standardization. "we should back away from all the pointer-ish
> interface"... Is it a serious question or a tease?
>

I'm not sure of your point, but if your point is that a lot of time
and effort has already been put in (and I suspect it has!) or that we
are too far along in the process:

I'd much rather put the extra effort in now than have thousands of
programmers deal with it post standardization.  Or worse yet, have a
feature that we still discuss changing _after_ standardization (ie
uniform initialization as just one example.  exported templates,...).

>
>>
>> No it should not. I'm not particularly enamoured with `operator*`, but
>> `operator[]` makes no sense at all. Why not just `value` (or `get` for those
>> who like that)? Do we really need an operator at all?
>
>
> Uhm, because we need to dereference 'optional' and the language has a
> dereferencing operator (op*) which happens to be used everywhere else to
> dereference.
>
>>
>> There is no "all the pointer-ish interface"; there's only `operator*.
>> That's the only part of optional that is like a pointer (OK, the `explicit
>> operator bool` too, but that's hardly unique to pointers); everything else
>> works differently from pointers.
>
>
> There is nothing "pointer-ish" about the operator called a dereferencing
> operator. Customization (oveloading) of that op* together with the other
> dereferencing op->() is "important to a class of interesting programs" (as
> Stroustrup puts it). Indeed, that interface (as many other concepts) has
> been borrowed from C where these operators worked with pointers and C++
> intentionally preserves C syntactic flavor. It does not make pointers claim
> "ownership" of these operators. These operators are the standard interface
> for the whole family of classes implementing the proxy concept/pattern...
> and the pointer is just one -- the most basic and primitive --
> implementation of that concept.
>
>
> --
>
> ---
> 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.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To post to this group, send email to std-proposals@isocpp.org.
To unsubscribe from this group, send email to std-proposals+unsubscribe@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



.
