Re: Proposing switch -fsmart-pointers

2012-10-09 Thread Peter
On Oct 8, 2012, at 5:17 PM, Andrew Haley a...@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

Re: Proposing switch -fsmart-pointers

2012-10-09 Thread Ladislav Nevery
Ahh ... sorry for that incomplete mail. I lost my right hand in paragliding accident 2 months ago. And writing mail with one hand on tablet is kinda weird. Again sorry .;( Here is the complete version. On Mon, Oct 8, 2012 at 5:17 PM, Andrew Haley a...@redhat.com wrote: On 10/06/2012 11:59 AM, _

Re: Proposing switch -fsmart-pointers

2012-10-09 Thread Andrew Haley
On 10/09/2012 12:31 AM, Peter wrote: On Oct 8, 2012, at 5:17 PM, Andrew Haley a...@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

Re: Proposing switch -fsmart-pointers

2012-10-08 Thread Florian Weimer
On 10/05/2012 06:08 PM, _ wrote: What you guys think about this? I think we should wait if the Rust folks come up with a sound (in the type-theoretic sense) and useful (in terms of programmer burden) solution. After that, we can contemplate whether we can retrofit their solution onto

Re: Proposing switch -fsmart-pointers

2012-10-08 Thread Andrew Haley
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

Re: Proposing switch -fsmart-pointers

2012-10-07 Thread Basile Starynkevitch
On Sun, Oct 07, 2012 at 02:47:59AM +0200, _ wrote: You will probably kill me for this. But no such patch yet exists. I am kinda trying findout wheter there is interest in such experiment and find some help since to me alone it would take ages. I would suggest you to experiment your idea thru

Re: Proposing switch -fsmart-pointers

2012-10-07 Thread Jonathan Wakely
On Oct 7, 2012 1:05 AM, _ neura...@gmail.com wrote: And as optional switch it's harmless to rest of gcc. This is not true. Every option adds a maintenance burden. It must be tested and its interaction with other features must be considered, making it harder to make future changes if they

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread _
Now obviously you can't put stl everywhere. I don't see kernel and low level C or C++ libs using boost or stl. any time soon. Afterall. No reasonable library uses it either due to binary incompatibilities. But the idea behind smart-pointers is universal end equally relevant in C and non stl

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread _
There is a lot of places you can(and you probably will) make bugs. A) less code less bugs. It's as simple as that. B) people forget or make misteakes in cleanup order. Compiller doesn't C) people put stuff to destructors. stuff that can (and will) blow and no or wrong resources are released. D)

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread Gabriel Dos Reis
On Sat, Oct 6, 2012 at 1:59 PM, _ neura...@gmail.com wrote: Now obviously you can't put stl everywhere. True. Did you send in a patch to review? -- Gaby

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread Oleg Endo
On Sat, 2012-10-06 at 20:59 +0200, _ wrote: Now obviously you can't put stl everywhere. I don't see kernel and low level C or C++ libs using boost or stl. any time soon. Afterall. No reasonable library uses it either due to binary incompatibilities. It seems that your proposed fix to that

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread _
On Sat, Oct 6, 2012 at 11:47 PM, Oleg Endo oleg.e...@t-online.de wrote: On Sat, 2012-10-06 at 20:59 +0200, _ wrote: Now obviously you can't put stl everywhere. I don't see kernel and low level C or C++ libs using boost or stl. any time soon. Afterall. No reasonable library uses it either due

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread _
You will probably kill me for this. But no such patch yet exists. I am kinda trying findout wheter there is interest in such experiment and find some help since to me alone it would take ages. But I love to see that you are interested. It really is encouraging to me. Thx. :) Ladislav On Sat, Oct

Re: Proposing switch -fsmart-pointers

2012-10-06 Thread Gabriel Dos Reis
On Sat, Oct 6, 2012 at 7:47 PM, _ neura...@gmail.com wrote: You will probably kill me for this. But no such patch yet exists. I am kinda trying findout wheter there is interest in such experiment and find some help since to me alone it would take ages. But I love to see that you are

Proposing switch -fsmart-pointers

2012-10-05 Thread _
Hi Guys By proposing switch I think no c++ standard is threatened. We allready have switch for unsigned char etc. Looking at most of effort being pushed to STL and all kinds of smart-pointer templates to produce more resilient code. I think C/kernel developers deserve some love too. I strongly

Re: Proposing switch -fsmart-pointers

2012-10-05 Thread Ian Lance Taylor
On Fri, Oct 5, 2012 at 9:08 AM, _ neura...@gmail.com wrote: I thing it would be best to implement it as compiller switch -fsmart-pointers not requiring scope object and derive statement for objects. ie we need equal flexibility and freedom like have today with static objects Experience shows

Re: Proposing switch -fsmart-pointers

2012-10-05 Thread Jonathan Wakely
On Oct 5, 2012 5:09 PM, _ neura...@gmail.com wrote: Hi Guys By proposing switch I think no c++ standard is threatened. We allready have switch for unsigned char etc. Looking at most of effort being pushed to STL and all kinds of smart-pointer templates to produce more resilient code. I