Boost logo

Glas :

Re: [glas] Skalar-Like concepts from GLAS and MTL

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-05-19 15:54:23


Peter Gottschling wrote:

>
> An important aspect of these concepts is that for instance AdditiveGroup
> is a refinement of Group, as in the GLAS proposal, but in an
> implementable way.

I have to look into this further but I definitly support the use of
functors.

However I'm not convinced yet that they should be whereever you do. Now
you define the AdditiveGroup to be a refinement of
{T,glas::def::groupAddOp<T>}. Additionally you propose in section 5.1 to
derive the functors from the operators. So would'nt it be more
straigthforward to require an operator+ (global or as a member) in the
concept itself.

> In addition, pure algebraic structures are not only
> defined informally but also as concepts for C++ template code and
> several examples are given how to use them. As a result of the concept
> refinements, each type modeling a multiplicative or additive concept can
> call functions for the corresponding pure algebraic concepts using
> default functors.
>
> The concepts so far cover the area of scalar-like concepts (and even
> there are still some open details). I added some sources to play around
> with. Any comment is welcome.
>

As for the 'pure algebraic concepts', your concept definitions are in
line (but more detailed) of the current glas proposal. So I propose to
merge these in the current proposal.

As for section 5.1 I'm wondering if it would'nt be interesting to only
associate functors with properties that introduce a new 'keyword'. For
instance, looking at the properties of Group, closure and associativity
are implicitly used, whereas for getting the identity or the inverse of
an element, some explicit call (to a function) must be performed.

Thanks for the interesting paper and I'll look more into it during the
weekend!