Subject: Re: [boost] [smart_ptr] Interest in the missing smart pointer (that can target the stack)
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-02-04 07:53:52
> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Rob Stewart
> Sent: 04 February 2016 10:46
> To: boost_at_[hidden]
> Subject: Re: [boost] [smart_ptr] Interest in the missing smart pointer (that can target the stack)
> On February 2, 2016 9:20:11 PM EST, Noah <duneroadrunner_at_[hidden]> wrote:
> > On 2/2/2016 1:40 AM, Rob Stewart wrote:
> It's a lot simpler than that: Trust the Programmer. That's been part of C and C++ from the start.
And that was a BIG mistake. Most programmers can't be trusted a millimeter (especially me).
>By all means default construct with zero-initialization and provide a converting constructor from
> types. That will provide the safety you're after. However, rather than prevent a not uncommon use
> case, just make that use case possible.
Surely, the root cause is failure to use *hardware* to detect 'failure-to-initialize' and
That's the only way this can be done efficiently.
But the C/C++ languages designed that out - no access to status flags and no proper
(and so the hardware hasn't been encouraged to do it well).
So C/C++ like software is doomed to be inefficient and/or dodgy.
That Robert has got few visible users suggests that most ordinary programmers just don't care.
(There are a subset that have their own small world with rules and programmer checkers to reduce the
But I applaud his dogged persistence and support anything to get wider use.
--- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk