Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-06-14 15:22:35

"Janek Kozicki" wrote
> Andy Little said: (by the date of Tue, 13 Jun 2006 00:59:11 +0100)
>> t1_quantity type in PQS is overcomplicated. Two decisions complicated the
>> design
>> of t1_quantity. The first was the requirement to distinguish dimensionally
>> equivalent quantities (torque and energy say).
> IMHO this distinguish is not that important. We only need units so that
> compiler will check if there is any mistake in the formulas...

I think the ability to distinguish quantity types is important for other

> Difference between torque and energy happens only during serialization
> (print N*m, or print J ?), so maybe instead of complicated
> abstract_quantity_id, there should be just some extra argument/setting
> that will talk with serialization functions?

Having thought about that I come to the conclusion that it is worthwhile to have
the extra complexity in the t1_quantity/fixed_quantity. Having some form of
output/serialisation for quantities is seemingly trivial, something like a toy
feature, but it is very useful indeed for demonstrating and communicating what
the type can do and for diagnosing what it is doing with minimal effort. That
may seem trivial but that type of feedback is very helpfull in the first stage
of trying out a library to see what it can do. I can speculate that is part of
the reason for the good level of interest in PQS, because it helps when
providing short examples in discussions like this. That simple functionality is
underrated IMO.

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at