From: Joel de Guzman (joel_at_[hidden])
Date: 2007-10-05 07:44:27
Simonson, Lucanus J wrote:
> As a library writer in an
> industrial setting I am faced with a challenge of how to overcome the
> complexity created by an explosion of C++ geometry types in numerous legacy
> applications. Integrating a superior library capability into pre-existing
> applications is a challenge due to type incapability. The important thing
> about my library is that I have solved that problem by applying C++ Concepts,
> inheriting my types from the template parameter, to allow a minimal concept
> map to provide the interface between my algorithms and the legacy system's
> geometry data types.
That's very good. I'm not quite sure about inheritance though.
> P.S. my point2d data structure is a class encapsulated array of size 2. You
> can override it with your own, of course, through the template inheritance
> generic interface.
With the restriction that it has to be indexable by a runtime int?
That is a severely limited concept of a point, I would say. And,
again, I find the need for inheritance dubious. Inheritance gives
you tight coupling. Something that you'd want to avoid when
adopting a 3rd party type. It is possible to adopt a 2d-point
from library A and library B without ever touching them. That's
the very essence of generic programming.
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk