comp.lang.ada
 help / color / mirror / Atom feed
From: Lucretia <laguest9000@googlemail.com>
Subject: Re: Interest in standard smart pointers for Ada 2020
Date: Thu, 31 Aug 2017 08:17:10 -0700 (PDT)
Date: 2017-08-31T08:17:10-07:00	[thread overview]
Message-ID: <73399847-b482-4442-a02f-1bf9c67b467b@googlegroups.com> (raw)
In-Reply-To: <oo8u6r$3va$1@dont-email.me>

On Thursday, 31 August 2017 13:12:20 UTC+1, Alejandro R. Mosteo  wrote:
> I wonder if there would be interest in standardizing some usual smart 
> pointers for the next revision. I will try to state the problems. I hope 
> you'll point any misunderstandings on my part.

Yes, I've had to write these in the past too. Royal pain to keep doing.

> If we look at the cousin C++, the standard pointers there are:

Cousin?
 
> > unique_ptr [1]
> 
> > Allows exactly one owner of the underlying pointer. Use as the default choice for POCO unless you know for certain that you require a shared_ptr. Can be moved to a new owner, but not copied or shared.

I just had to look up POCO, seems to be Plain old CLR Object, don't think that's what you meant.

I would add auto_ptr too, I've implemented one before, although I think Block_Pointer would be a better Ada name for it. Should be limited, initialised with extended return and frees the contents at the end of the block in which it was instantiated.


  parent reply	other threads:[~2017-08-31 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 12:12 Interest in standard smart pointers for Ada 2020 Alejandro R. Mosteo
2017-08-31 12:48 ` Dmitry A. Kazakov
2017-09-03 11:18   ` Alejandro R. Mosteo
2017-09-03 12:45     ` Dmitry A. Kazakov
2017-08-31 15:17 ` Lucretia [this message]
2017-08-31 15:51   ` Peter Chapin
2017-08-31 18:57     ` Lucretia
2017-09-01  9:05   ` AdaMagica
2017-09-02 14:03   ` Jere
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox