Boost logo

Glas :

Re: [glas] MTL3 design ? [was MTL project site is up]

From: Guntram Berti (berti_at_[hidden])
Date: 2005-02-03 03:47:52


On Wed, Feb 02, 2005 at 04:42:07PM -0500, David Abrahams wrote:

> Guntram Berti <berti_at_[hidden]> writes:
>

> I won't consider introducing checking in MTL until there is an example
> of a kind of problem it can prevent that is more serious than the
> inconvenience the checking introduces. Introducing a checking policy
> parameter has yet another disadvantage: increased complexity. Don't
> underestimate this -- it creeps everywhere, including tests and docs.
> So the problem prevented by checking would have to be more serious
> than the inconvenience and the complexity.

Reducing complexity is certainly a design goal we should keep in mind.
Maybe the solution proposed by Karl (AssignmentAdapter) helps to keep such
decisions localized.
However, I think/wish there should be the possibility to fit in user-defined/configured
vector types into the general framework.
So people who do not use extra features like checking can go with a low-complexity
plain vector, while others use that feature-laden mega-vector :-)

I also agree that we should collect much more examples before making a final decision here.

>
> > I think it will not be uncommon to wish to forbid even assignment
> > between vectors of equal size, for example if one represents
> > cell-based and the other one vertex-based quantities (speaking
> > FEM). So one could introduce mechanisms to forbid assigment at
> > compile time (i.e. making those vectors different types).
>
> Or const?
>

No, because I still want to be able to assign vectors of the same (mathematical!) 'type'.
Assignment is really just a special case: Think of operations like addition where we also
will have to carefully decide which combinations are allowed and which are not.
"Same c++ type" is not the only useful criterion here.

--guntram

-- 
============================================================
Guntram Berti -- NEC C&C Research Labs              O__  ==
Rathausallee 10, D-53757 St. Augustin, Germany     c/ /'_ == 
++49 +2241 92 52  -32(voice) -99(fax)             (*) \(*) ==
                                                  ------------ 
http://www.ccrl-nece.de/~berti - berti_at_[hidden]
============================================================