Boost logo

Glas :

Re: [glas] Re: MTL project site is up

From: David Abrahams (dave_at_[hidden])
Date: 2005-01-31 16:17:53

Toon Knapen <toon.knapen_at_[hidden]> writes:

> Hi Dave,
> Thanks for posting these documents. I've read them with great interest.
> I do have a few questions though but let me start of with one of my most
> essential questions about the object model (and probably by answering
> this one you answer also to some of my other questions):
> Why do you prefer shallow copy semantics?

I don't. What gave you the idea that I did?

> Is this because you don't want
> to make a distinction between containers and views (and thus treat
> everything as a collection)? Would it not be interesting to use a policy
> to define the copy semantics? Additionally the stack based objects can
> not provide shallow copy semantics so is requiring shallow copy
> semantics generic enough?
> And finally (and a bit related to the above), the operator= for vectors
> does not require both vectors to have the same size.

I haven't written an operator= yet. If you're basing your remarks on
what's in Jeremy's paper, you should know that I don't plan to do
everything the same way as he did; not by a long stretch.

> Thus the lhs will
> be resized to the size of the rhs. But again this poses a problem with
> stack-based objects because they can't be resized. And why actually do
> you prefer to resize the lhs instead of requiring that both vectors have
> the same size?
> toon
> _______________________________________________
> glas mailing list
> glas_at_[hidden]

Dave Abrahams
Boost Consulting