This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Proposing switch -fsmart-pointers


On 10/09/2012 12:31 AM, Peter wrote:
> 
> On Oct 8, 2012, at 5:17 PM, Andrew Haley <aph@redhat.com> wrote:
> 
>> On 10/06/2012 11:59 AM, _ wrote:
>>> Not that I think that STL/Boost are not great solutions for many
>>> problems out there.
>>> But the fact is that there is and always will be c/c++ code that can't
>>> and will not use it.
>>
>> But surely the set of people refusing to use C++ smart pointers is the
>> same set that will refuse to use your -fsmart-pointers.
> 
> It all boils down whether they are othodox or just simply
> pragmatic. I am optimist and belive in second :)

Me too, but there's nothing more pragmatic about adding
-fsmart-pointers to gcc when we already have smart pointers in C++.

>>> C or C like templateless C++ code is still domain of most  os /
>>> drivers source code out there.
>>> Just go agead and try to ask Linus to wrap all pointers to stl
>>> templates ;D
>>
>> And he'd have the same response to -fsmart-pointers.  Face it, the
>> only real differences a compiler builtin would bring are:
>>
>> 1.  A fossilized "smart pointer type".
>> 2.  A different declaration syntax.
> 
> Now imagine you have 300 developers with varying experience or
> ability to work under pressure.

I don't have to imagine that.  But of course you have to do the
cleanup anyway because it is unlikely that in a large application it is
appropriate to replace *every* use of a pointer with a smart pointer:
some you do, some you don't.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]