220 8610 <CANh-dX=N0DhDbHh5TdaGcc5K5x=qOV6itWJzgVP8aG2facA3RA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Jeffrey Yasskin <jyasskin@google.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: string_view::is_null()
Date: Wed, 15 Jan 2014 10:26:14 -0800
Lines: 32
Approved: news@gmane.org
Message-ID: <CANh-dX=N0DhDbHh5TdaGcc5K5x=qOV6itWJzgVP8aG2facA3RA@mail.gmail.com>
References: <8045a4d2-721d-4725-8bb7-7a91b6f53ec8@isocpp.org>
 <CANh-dXkOyaq0U9MkYiiZeTTMcNVNXVG6vqqwBOCymXLHpV1VJg@mail.gmail.com>
 <1140684e-4619-4b14-9e0e-fdb30d830333@isocpp.org> <2875722.TjfBuHt6Pp@tjmaciei-mobl2>
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 1389810401 7658 80.91.229.3 (15 Jan 2014 18:26:41 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 15 Jan 2014 18:26:41 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRBYVF3OLAKGQEP3ETC2A@isocpp.org Wed Jan 15 19:26:45 2014
Return-path: <std-proposals+bncBDDM34EO6QDRBYVF3OLAKGQEP3ETC2A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f197.google.com ([209.85.220.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDM34EO6QDRBYVF3OLAKGQEP3ETC2A@isocpp.org>)
	id 1W3VAp-0002I1-6F
	for gclcip-std-proposals@m.gmane.org; Wed, 15 Jan 2014 19:26:43 +0100
Original-Received: by mail-vc0-f197.google.com with SMTP id hq11sf2223346vcb.4
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Jan 2014 10:26:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=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:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=8J9IgrfngsjGU5hc7RawvGLUA67709mT78ngrY52W8w=;
        b=XJy/MDhTFW0zHkllxnPpSKibdMBPSBL5ZQZJFbhS/sqb7FpjkfSKcnsNmYObcchdif
         ky4YidELkNTCD91rTCYwr7IpfE6kbWcTBk7Q0fVUEdK//aiLIBJiFQzD9W1cChSwtIAO
         MQ8NuwmXIad0VGgXUtJVqy4ihKFWQ/0mEn4/qZGU4RpkaNwNzbHYMFTMKF4VFhJmNzuN
         7YhFQPDl1MoAddsHGQTihw+iLutYrGGBSM0bT6hazcfm1WWb27nN63ZcVboxcH9bBdXb
         YpnUiE4N5ya2CrKs060q6S+rR5HVV4SY+t3paXKTD4Zm8BZ4ho70zMieLKUeZWdvBMnR
         wLsQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state: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:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=8J9IgrfngsjGU5hc7RawvGLUA67709mT78ngrY52W8w=;
        b=VEp1RbmkHTGS3Omftt2KnoKaZRafiiixq8ycxosQzpN1V3MQhDT/lRmLz2E0KE2FWh
         bvWU/QcMPGrGCiTcKYLUFmgzghqOowmxzcfRW5keb8P60xhSVnBTsTiyEgZrt4AkC5i3
         V1pf8dWrw8fQc2LxJ6SdtIZz3fL33M12EICDf2wqshE3wEoieb35LJ07X312a1eiLSvH
         7pWXQpZTMAIZpTku3nFz4AQ0hyqgtOYhV+GKg8Kmh38A7X/WLNPGq00U60TUAEVmwB7P
         YJ39ergt8IkganIhMFTgNykMj5FZ64i00dWDcOWcY5zMKWEKeg15DvZ6aZaF8qSJQnzH
         fgOA==
X-Gm-Message-State: ALoCoQmagwvwfI/z20PH7REn48I76LlCfmoLJm7BvnluULxfV/fHtm5vOhpdO1uwKA7VwGaUsQVl
X-Received: by 10.52.159.99 with SMTP id xb3mr1202464vdb.4.1389810402379;
        Wed, 15 Jan 2014 10:26:42 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.99.71 with SMTP id eo7ls751937qeb.20.gmail; Wed, 15 Jan
 2014 10:26:34 -0800 (PST)
X-Received: by 10.49.48.69 with SMTP id j5mr7054297qen.71.1389810394262;
        Wed, 15 Jan 2014 10:26:34 -0800 (PST)
Original-Received: from mail-qe0-x22e.google.com (mail-qe0-x22e.google.com [2607:f8b0:400d:c02::22e])
        by mx.google.com with ESMTPS id 7si6493215qev.48.2014.01.15.10.26.34
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 15 Jan 2014 10:26:34 -0800 (PST)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 2607:f8b0:400d:c02::22e as permitted sender) client-ip=2607:f8b0:400d:c02::22e;
Original-Received: by mail-qe0-f46.google.com with SMTP id 8so1417875qea.5
        for <std-proposals@isocpp.org>; Wed, 15 Jan 2014 10:26:34 -0800 (PST)
X-Received: by 10.229.56.200 with SMTP id z8mr7379072qcg.1.1389810394106; Wed,
 15 Jan 2014 10:26:34 -0800 (PST)
Original-Received: by 10.229.208.138 with HTTP; Wed, 15 Jan 2014 10:26:14 -0800 (PST)
In-Reply-To: <2875722.TjfBuHt6Pp@tjmaciei-mobl2>
X-Original-Sender: jyasskin@google.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jyasskin@google.com designates 2607:f8b0:400d:c02::22e as permitted
 sender) smtp.mail=jyasskin@google.com;       dkim=pass header.i=@google.com;
       dmarc=pass (p=REJECT dis=NONE) header.from=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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8610
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8610>

On Wed, Jan 15, 2014 at 9:22 AM, Thiago Macieira <thiago@macieira.org> wrote:
> On quarta-feira, 15 de janeiro de 2014 04:20:11, Olaf van der Spek wrote:
>> In some cases being able to distinguish between null and empty is required.
>> string_view could easily support this distinction, what's the reason it
>> should be discouraged?
>
> Just FYI
>
> Once std::string_view came into focus, I looked into QStringRef to see if it
> could be updated for Qt 6 and support the same semantics. Whereas
> std::string_view consists of two iterators (begin and end), QStringRef
> actually contains a pointer to the original QString, plus an offset and length.
> That's what I tried to change.
>
> There were two reasons why that did work: one was specifically the isNull()
> method, since the "nullness" is a property of the QString which a pair of
> iterators cannot represent. That is, a null QString and an empty-but-null
> QString can have the same data pointer.

Can you look over some of the uses of isNull() in QT and see what
fraction are ones where both empty and null are possible values, and
the distinction is useful rather than just forcing the API to document
which one is used?

-- 

--- 
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/.

.
