220 2146 <CAGsORuB4mQ-+xb3R79=kKEnoLfQgbY2ZRuD6A-a8V5+nndUWtw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <lichray@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: optional<T>, one more value or two states
Date: Thu, 24 Jan 2013 12:13:08 -0600
Lines: 32
Approved: news@gmane.org
Message-ID: <CAGsORuB4mQ-+xb3R79=kKEnoLfQgbY2ZRuD6A-a8V5+nndUWtw@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>
	<51013FC6.9080907@bubblescope.net>
	<CAGsORuDaFt3tweHJGe+XeWLjoMnCUc+r8-3uLR9JJVFYOmW3BA@mail.gmail.com>
	<CANh-dXkCNy5iVk3D0NZxRw9DifzZwou2KFi+r374cBV5fFRXFQ@mail.gmail.com>
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 1359051191 30542 80.91.229.3 (24 Jan 2013 18:13:11 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Jan 2013 18:13:11 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUILMGRQMARBNPTQWEAKGQEOR6KU4I@isocpp.org Thu Jan 24 19:13:28 2013
Return-path: <std-proposals+bncBCUILMGRQMARBNPTQWEAKGQEOR6KU4I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f198.google.com ([74.125.82.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUILMGRQMARBNPTQWEAKGQEOR6KU4I@isocpp.org>)
	id 1TyRIm-0005TJ-0u
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Jan 2013 19:13:28 +0100
Original-Received: by mail-we0-f198.google.com with SMTP id r1sf5472026wey.9
        for <gclcip-std-proposals@m.gmane.org>; Thu, 24 Jan 2013 10:13:10 -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=wDcEovdiKrIwYR1gj0y5QgPAcInlBC0uzZIanZ+Tw74=;
        b=JAkh/a/ZU24SHkuBSJlAZ+dGsdRyLg+m1VlMzOFWzUSrMxYd7XnEU5B5tYh2U5se5j
         E4HADUwRxHenwraduRwqIVhrf3/OHM6YyD7T93T6EtFc3hmdOsiazxAbOEAqU403/y+b
         u066X2e4aoxmIWiJFVQSGjDjW4yyQFmnae3OIDm1RoSgLdsTxLEnVXxU8hSCRCqQGD1E
         lAGkMOdwdSGQ6sDHvsB+jzWMc35GVdbuCPYfqjWVTK77uNdsagkMs3wm8BDPUwPF2DdH
         iI3xo3U1+2Al9wgwCPdwZQBYeoIGen3JT1GWss+s9XdwW+tYs 
X-Received: by 10.112.48.39 with SMTP id i7mr383112lbn.13.1359051190315;
        Thu, 24 Jan 2013 10:13:10 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.108.103 with SMTP id hj7ls48498lab.86.gmail; Thu, 24 Jan
 2013 10:13:09 -0800 (PST)
X-Received: by 10.112.86.232 with SMTP id s8mr1150202lbz.86.1359051189519;
        Thu, 24 Jan 2013 10:13:09 -0800 (PST)
X-Received: by 10.112.86.232 with SMTP id s8mr1150200lbz.86.1359051189496;
        Thu, 24 Jan 2013 10:13:09 -0800 (PST)
Original-Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169])
        by mx.google.com with ESMTPS id tv7si1133346lab.119.2013.01.24.10.13.08
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 24 Jan 2013 10:13:08 -0800 (PST)
Received-SPF: pass (google.com: domain of lichray@gmail.com designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169;
Original-Received: by mail-lb0-f169.google.com with SMTP id m4so6514680lbo.0
        for <std-proposals@isocpp.org>; Thu, 24 Jan 2013 10:13:08 -0800 (PST)
X-Received: by 10.152.114.42 with SMTP id jd10mr2718124lab.31.1359051188317;
 Thu, 24 Jan 2013 10:13:08 -0800 (PST)
Original-Received: by 10.112.75.131 with HTTP; Thu, 24 Jan 2013 10:13:08 -0800 (PST)
In-Reply-To: <CANh-dXkCNy5iVk3D0NZxRw9DifzZwou2KFi+r374cBV5fFRXFQ@mail.gmail.com>
X-Original-Sender: lichray@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of lichray@gmail.com designates 209.85.217.169 as permitted sender)
 smtp.mail=lichray@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:2146
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2146>

On Thu, Jan 24, 2013 at 12:01 PM, Jeffrey Yasskin <jyasskin@googlers.com> wrote:
> optional<T> has good reasons to make its
> conversion implicit, and if convert() is adopted, those reasons

My reason to support explicit conversion is a logical reason.
Think of type T with possible values { a, b, c }, and U with
possible values { a, b, c, x }, we can say T is-a U, since T can
be used everywhere U can be used.  And in such a case,
an implicit conversion from T to U is logically.

But optional<T> should be different.  In type theory, it's
T' build upon T, with possible values { a', b', c', None }.  An
implicit conversion should not be allowed here.  And no
existing functional programming language has an logic
such that to use T instead of `Some T`.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

-- 

--- 
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.



.
