220 28934 <nu53qp$lvv$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Bo Persson <bop@gmb.dk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Is World's Dumbest Pointer still on the table?!?
Date: Tue, 18 Oct 2016 14:16:26 +0200
Lines: 52
Approved: news@gmane.org
Message-ID: <nu53qp$lvv$1@blaine.gmane.org>
References: <8a6731f7-1c9b-482d-817e-c2374fc9ae1b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Trace: blaine.gmane.org 1476793044 17574 195.159.176.226 (18 Oct 2016 12:17:24 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 18 Oct 2016 12:17:24 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.4.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCZ6RLW3UIKBBQNFTDAAKGQEYD6IH7Y@isocpp.org Tue Oct 18 14:17:20 2016
Return-path: <std-proposals+bncBCZ6RLW3UIKBBQNFTDAAKGQEYD6IH7Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f72.google.com ([209.85.215.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCZ6RLW3UIKBBQNFTDAAKGQEYD6IH7Y@isocpp.org>)
	id 1bwTKK-0002HF-Bz
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Oct 2016 14:17:04 +0200
Original-Received: by mail-lf0-f72.google.com with SMTP id b75sf9825721lfg.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Oct 2016 05:17:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Lp4HFLWPTcZuEiuUwsS/J1Yi0SylPgUn2r8kjhnZOMI=;
        b=GCsn4GwzIrSA6f/cBMlLZXWOOe22Qrv9wQj4q/z9VkJoNd14GVw3teCSV51gkIYDwm
         bURpTmG5i6aQgffVnRgtrBJSSpqS2LiXl5b5Q/e5C1kAwaVmqPFnx0/NUr+t7IrEwKNp
         pSCv7w8YhXVemoBbMl0+61v5idgQG7Nag0UVoka7nBKwco1g/SEJWpibR9A14tbMRnaq
         UthZ3+TSOT8yI74tnyp+J1vltawN3Qt7ovTjnpgjRxJOWoRh4XCTzkD4/mFEdN9m4SV5
         NRDE8N5LaYDuP3n3MqLwVgGHAPKsOspNV0t+7wcZV64ANIzeaE3A2TEzth46QbwOkOoq
         gQLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Lp4HFLWPTcZuEiuUwsS/J1Yi0SylPgUn2r8kjhnZOMI=;
        b=Ka0jcCq7U3pYhuuWvSNLp3/E3LsvJrVf4tJvbmjY6sGjH6rVXA7F8fqutvCmlMZjTZ
         Hwa4YZY8GA9GWxkLjfHsvhfrqAivo95LiuplYumJY3Y6ZZq8KBGGdk0Hs7ODbEvFKqad
         nAFWKgXwBlkVHlNPdchr7y980uXIKTugG7rXwOBZ1foJwMeXg9vhtZ4VCjCNfrLUlIuz
         MJ5uesiyE9AVSaU3PFO/74Xpw8VWflWEtxy0htzrLC4vmceavF7eUbudW9UaJMp9sSHS
         90CBmTBXVVqDEZtpFMQ93crexEEfgRKowUZEw3YFvJJPp47ra9cwoCn+F7hSX4RCBjl0
         5MqA==
X-Gm-Message-State: AA6/9RlPWFpNm4rH2gEiCtlVoQRe185Yk4l5bCKKS4fT3tO8avT1arBjYhi+33KTftTTkA==
X-Received: by 10.194.113.106 with SMTP id ix10mr6291wjb.7.1476793026676;
        Tue, 18 Oct 2016 05:17:06 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.199.84 with SMTP id x81ls2773205lff.18.gmail; Tue, 18 Oct
 2016 05:17:05 -0700 (PDT)
X-Received: by 10.25.206.138 with SMTP id e132mr140077lfg.39.1476793025069;
        Tue, 18 Oct 2016 05:17:05 -0700 (PDT)
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id 82si1485826lfz.230.2016.10.18.05.17.04
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 18 Oct 2016 05:17:04 -0700 (PDT)
Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) client-ip=195.159.176.226;
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1bwTK1-0008Q2-5z
	for std-proposals@isocpp.org; Tue, 18 Oct 2016 14:16:45 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 45
Original-X-Complaints-To: usenet@blaine.gmane.org
In-Reply-To: <8a6731f7-1c9b-482d-817e-c2374fc9ae1b@isocpp.org>
X-Original-Sender: gclcip-std-proposals@m.gmane.org
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 195.159.176.226 is neither permitted nor denied by best guess
 record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:28934
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28934>

On 2016-10-18 12:03, mihailnajdenov@gmail.com wrote:
> I was surprised to see
> http://en.cppreference.com/w/cpp/experimental/observer_ptr
>
> I though, it was settled, raw pointers will be serving as non-owning
> pointers? (and use references, as well not_null<> and owner<> to cover
> corner cases and legacy)
>
> Also, observer_ptr is not without problems too.
>
> For instance, it has lifetime management API (reset, release) although
> it does not manage lifetime!
>
> Right now if you see reset or release in code, it means the object
> lifetime has been altered - either deleted, a ref dropped or no longer
> managed.
> observer_ptr will change that for the worse - these will start to mean
> something different.
>
> Also, it can be well misleading, it monitors object lifetime - after all
> other smart pointers /control /lifetime, this one is probably just
> /observing/ it.
>


Having similar functions use the same names as functions of the slighlty 
smarter pointers, might help replacing those with an observer_pointer. 
Changing "release" into "stop_observing" (or something) doesn't appeal 
to me.


If we look at a similar problem in merging "optional", "variant", and 
"any" into the draft standard, we ended up with two of them having a 
"bool has_value()" function, while the third got a "bool 
valueless_by_exception()".

Not only do they have different names, but also different true/false 
return value for the same(?) condition - does it store anything.

I think the "release" function for the pointer types is similar enough - 
give me the pointer, I'll take care of it!


    Bo Persson


-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/nu53qp%24lvv%241%40blaine.gmane.org.

.
