220 2147 <CANh-dXnF6yCyYWwwA0DGbot5EBufUkQqoz8sy-hRqHN-JmGeiA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Jeffrey Yasskin <jyasskin@googlers.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: optional<T>, one more value or two states
Date: Thu, 24 Jan 2013 10:15:58 -0800
Lines: 29
Approved: news@gmane.org
Message-ID: <CANh-dXnF6yCyYWwwA0DGbot5EBufUkQqoz8sy-hRqHN-JmGeiA@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> <CAGsORuB4mQ-+xb3R79=kKEnoLfQgbY2ZRuD6A-a8V5+nndUWtw@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 1359051380 670 80.91.229.3 (24 Jan 2013 18:16:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Jan 2013 18:16:20 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRB5HUQWEAKGQERBGSW4Y@isocpp.org Thu Jan 24 19:16:39 2013
Return-path: <std-proposals+bncBDDM34EO6QDRB5HUQWEAKGQERBGSW4Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ia0-f200.google.com ([209.85.210.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDM34EO6QDRB5HUQWEAKGQERBGSW4Y@isocpp.org>)
	id 1TyRLq-0007Lg-Ju
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Jan 2013 19:16:38 +0100
Original-Received: by mail-ia0-f200.google.com with SMTP id i38sf16322693iae.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 24 Jan 2013 10:16:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlers.com; s=googlers;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :x-received:mime-version:in-reply-to:references:from:date:message-id
         :subject: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=TDG+En9iPXlEEwFHS5qMELgai2sqwJXuaNGWZhwatIY=;
        b=S9B+P3v8gsjY1Fy+NyUCC2XEUHxPnGoy3NNRsaOtO4ulvlcmPh9z2RjgZ8ceMhO+M6
         6Ic1IXSWb2bWkJH8KGYHz0+o6X+rraIOdZq6kdb29idjdCCI4ZTOk0HNB8DKxZ+9Erv0
         6tcvaYdvAuj3UOLeiHu8t12FeUlRzyx/eI4xg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :x-received:mime-version:in-reply-to:references:from:date:message-id
         :subject: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=TDG+En9iPXlEEwFHS5qMELgai2sqwJXuaNGWZhwatIY=;
        b=lv5VCxTIgdKLtVzLCm+K7f23/Hd1xazJ+wJGxZceETdGRC9JPRqEgJzpjtPI29VduP
         k0LGBBEgaPwcfzFz8IJSf/URFkOJ6rNUJcH+irhWMTOj2CgYXHSRwQ7w5zQQ8I9BlPK0
         oEa18DcDBObinFc8trISHW6VNOHmbbT6Lkc2jUWu/0pAf8aMim+BDKD30JQerAPCoRGX
         K2FMcHs1q8MiuxGtS1k0rHDOzqUnuBgURLD8difJKZdNjN+toUrEhxxSpse4TBhju6mg
         6EWeUU0iSxFJSnlL21qM 
X-Received: by 10.182.154.42 with SMTP id vl10mr739887obb.14.1359051380564;
        Thu, 24 Jan 2013 10:16:20 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.109.71 with SMTP id hq7ls178215obb.60.gmail; Thu, 24 Jan
 2013 10:16:20 -0800 (PST)
X-Received: by 10.182.119.105 with SMTP id kt9mr2289676obb.19.1359051380060;
        Thu, 24 Jan 2013 10:16:20 -0800 (PST)
X-Received: by 10.182.119.105 with SMTP id kt9mr2289675obb.19.1359051380041;
        Thu, 24 Jan 2013 10:16:20 -0800 (PST)
Original-Received: from mail-oa0-f51.google.com (mail-oa0-f51.google.com [209.85.219.51])
        by mx.google.com with ESMTPS id s1si25090611oeb.2.2013.01.24.10.16.19
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 24 Jan 2013 10:16:19 -0800 (PST)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 209.85.219.51 as permitted sender) client-ip=209.85.219.51;
Original-Received: by mail-oa0-f51.google.com with SMTP id n12so10385865oag.10
        for <std-proposals@isocpp.org>; Thu, 24 Jan 2013 10:16:18 -0800 (PST)
X-Received: by 10.60.25.227 with SMTP id f3mr2311567oeg.17.1359051378843; Thu,
 24 Jan 2013 10:16:18 -0800 (PST)
Original-Received: by 10.182.150.36 with HTTP; Thu, 24 Jan 2013 10:15:58 -0800 (PST)
In-Reply-To: <CAGsORuB4mQ-+xb3R79=kKEnoLfQgbY2ZRuD6A-a8V5+nndUWtw@mail.gmail.com>
X-Gm-Message-State: ALoCoQlQrW6mlnjf3W4FFRTcUI2AiqZOwJE0qMsV5bQQGWztGYO8B6MPyqOVs4FPnE9HmU4odH0RvBSjInXjeP9eZLeafr5jkzaK+/7093skl1CRY4my/Dcb2i0eBUQLb4vzrMkV3Zx92fycJscqTF8Y3JbIY0iXuQ0QWpU36dM8f8sJyze6g2nXkBUp1UxOAiwzx5fMGTXC
X-Original-Sender: jyasskin@googlers.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jyasskin@google.com designates 209.85.219.51 as permitted sender)
 smtp.mail=jyasskin@google.com;       dkim=pass header.i=@googlers.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:2147
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2147>

On Thu, Jan 24, 2013 at 10:13 AM, Zhihao Yuan <lichray@gmail.com> wrote:
> 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`.

Which functional languages have user-defined implicit conversions at all?

-- 

--- 
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.



.
