220 2433 <CAOHCbitWGAFHwVMNQA4T4QEXG0c4oKrvFo2bcMkyi1y=nViXkg@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: Mon, 28 Jan 2013 13:50:34 -0500
Lines: 34
Approved: news@gmane.org
Message-ID: <CAOHCbitWGAFHwVMNQA4T4QEXG0c4oKrvFo2bcMkyi1y=nViXkg@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>
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 1359399037 27904 80.91.229.3 (28 Jan 2013 18:50:37 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 28 Jan 2013 18:50:37 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUZ5QWKNQIPXEE3RACRUBAMNPNNG@isocpp.org Mon Jan 28 19:50:57 2013
Return-path: <std-proposals+bncBCUZ5QWKNQIPXEE3RACRUBAMNPNNG@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f71.google.com ([209.85.213.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIPXEE3RACRUBAMNPNNG@isocpp.org>)
	id 1TztnC-0002dn-6H
	for gclcip-std-proposals@m.gmane.org; Mon, 28 Jan 2013 19:50:54 +0100
Original-Received: by mail-yh0-f71.google.com with SMTP id m1sf4410257yhg.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 28 Jan 2013 10:50:35 -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=JWfQKCNI1YE/LplITfHME5Smsh+O8jyrXJ2eqahkJF0=;
        b=QjolLh/wwJiRbK1ppJbgiGlqXVwDkVrcIx4l/Mq+KlX9jX1OvCN7W+r8NS5QWY++9D
         9XNE+PWWY3YXFTXNqsaEC7avEnqLK6YdoEtKcWdwTKc87jnuuwByN5YhZt++mWoJqMl/
         fl8v4npi5iup6GSRKy1zDavySLUCezG5EAFzN0KyUNPOJFZK56TgGLaMpKq6MlkLPkc3
         kTkkBgm/AZchafOq/xaNKZ879I9cAJ/cyChJLErTJHKxXrkvIVnTJ2ns0FRmS45MJk5e
         UKItvnPYBWNiGBU5IHuM49nFm8eQRUtq/FG6i+eo+cemIYgaE 
X-Received: by 10.58.137.65 with SMTP id qg1mr9121960veb.7.1359399035841;
        Mon, 28 Jan 2013 10:50:35 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.25.41 with SMTP id z9ls1112656qef.83.gmail; Mon, 28 Jan
 2013 10:50:35 -0800 (PST)
X-Received: by 10.224.26.210 with SMTP id f18mr9180497qac.49.1359399035304;
        Mon, 28 Jan 2013 10:50:35 -0800 (PST)
X-Received: by 10.224.26.210 with SMTP id f18mr9180496qac.49.1359399035279;
        Mon, 28 Jan 2013 10:50:35 -0800 (PST)
Original-Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180])
        by mx.google.com with ESMTPS id n7si3127893qad.95.2013.01.28.10.50.35
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 28 Jan 2013 10:50:35 -0800 (PST)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.216.180 as permitted sender) client-ip=209.85.216.180;
Original-Received: by mail-qc0-f180.google.com with SMTP id v28so1434007qcm.25
        for <std-proposals@isocpp.org>; Mon, 28 Jan 2013 10:50:35 -0800 (PST)
X-Received: by 10.229.180.35 with SMTP id bs35mr4069566qcb.22.1359399035157;
 Mon, 28 Jan 2013 10:50:35 -0800 (PST)
Original-Received: by 10.49.87.168 with HTTP; Mon, 28 Jan 2013 10:50:34 -0800 (PST)
In-Reply-To: <4f505b21-669a-4ef0-95b9-edf9e5afa22d@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.180 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:2433
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2433>

On Fri, Jan 25, 2013 at 6:22 PM, Nicol Bolas <jmckesson@gmail.com> wrote:
>>
>> Is there a difference between empty and null?
>
>
> Yes: `optional<T*>` exists. Such an object has 3 possible states: the
> optional could be empty. The optional could contain a valid pointer. Or the
> optional could contain nullptr.
>
> That's why we should not consider them the same. To me, "null" means "a
> pointer which has no value and cannot be derefenced". If you say that an
> `optional<T*>` is "null", my assumption is that you're talking about what is
> stored within the optional and not the state of the optional itself.
>

Same problem with "empty" and optional<vector<int>>.  Which is empty,
the optional or the inner container?

Maybe a better term is "nonvalue" or notavalue or something.  Or
always say "disengaged".  But should "nullopt" be called something
else?

Tony

-- 

--- 
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.



.
