Boost logo

Boost Users :

From: Andy Little (andy_at_[hidden])
Date: 2006-02-25 03:53:50


"David Abrahams" wrote
> "Andy Little" writes
>
>> "David Abrahams" wrote
>>> "Andy Little" writes
>>>> I am not concerned with the intractible problem of sequence identity
>>>> ( whatever that means) at the moment.
>>>
>>> Then what was this indictment about?
>>>
>>> Me:
>>> > The result of the transform is only required to be "concept-identical"
>>> > to the result you're looking for.
>>>
>>> You:
>>> IMO that behaviour is sloppy.
>>
>> What can I say? I acknowledge that mpl is a monumental piece of work .
>> Wonderful... but far from perfect.
>
> I don't think the fact that it's imperfect gives you the right to
> label any arbitrary design decision as sloppy.

I dont follow? "any arbitrary decision"?

> You seem to have no
> justification at all for calling the behavior mentioned above
> "sloppy," notwithstanding that it reminds you of another behavior that
> you dislike.

The behaviour of having a return type defined as a concept rather than a type in
this case is unnecessarily imprecise. In practise (Based on my experience in pqs
physical quantities library) it causes an explosion of arbitrary types all
meaning the same thing. This in turn leads to slow compile times and overuse of
compiler resources and with the fatal effect in some cases, that the compiler
cannot cope resulting in a failed compilation.

An alternative suggestion is to explicitly specify what seems to be the actual
behaviour of arithmetic operations on int_'s, long's etc in the documentation.
The actual behaviour seems to be that these functions invariably return an
integral_c. It could then also be specified that the value_type of the result is
found by applying the usual promotion rules to the types of each of the (non
mpl::na) arguments. That would at least tighten up any play in the current
specification. In order to get the desired behaviour it would then be a question
of only using integral_c's of one value_type.

Having said the above its not actually that important to me what mpl does to be
honest. I only use it in trivial ways in pqs. Having put it in and taken it of
the library out a couple of times I have found I am happier without it, and
would be very reluctant to put it back in again.

regards
Andy Little


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net