Boost logo

Glas :

[glas] Re: MTL project site is up

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-01-31 15:05:01


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? 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. 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