Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-03 22:32:52


"Justin M. Lewis" wrote:
> > > Again, like I said, everything new has some associated learning curve,
> and a
> > > lot of what goes into boost is NEW.
> >
> > The interface to the smart pointers is not new -- it exists in
> > std::auto_ptr<>.
>
> So what, the interface to smart_ptrs might not be, but you ignored all of
> the other examples. Your argument is basically that we should avoid new
> things whenever possible, because people would have to learn how to use
> them.

No, my argument is to stick to old things when possible. In this case,
it's possible.

> And as I pointed out there are very old C ways of doing everything we
> do in C++, but we all learned C++ anyway, because there are advantages to
> the new C++ way of doing things.

Not everything (eg templates).

> And, I'm proposing a yet newer way of doing this that definetly has
> advantages over the old way.

If it has definite advantages, why have so many boost developers not
bought into it?

> Again, how do you differentiate the use of a dumb_ptr that's just you using
> a pointer, because the function is expecting data that has been allocated
> with new, from an out, or in_out param?

One more time:

  void f( dumb_ptr< T const > in_ );
  void f( dumb_ptr< T > inOut_ );
  dumb_ptr< T > f(); // out

  int i = 5;
  dumb_ptr< int const > in( &i );
  dumb_ptr< int > inOut( &i );
  dumb_ptr< int > out = f();

  f( in );
  f( inOut );

Exactly what's confusing you with the above?

Noel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk