
Andy Little said: (by the date of Sat, 17 Jun 2006 21:14:57 +0100)
"Oleg Abrosimov" <beholder@gorodok.net> wrote
Moreover, I have a strong feeling that the solution with simple Length would be better. In particular, it'll simplify your code that uses PQS. You've said that PQS helps you to remember in what units a variable is. In a scheme with Length you simply have no need to remember it nor think about it anymore.
Of course, I can be completely wrong. If so, I would like to see a complete example were current scheme is beneficial. In C++, please.
Have you looked in the examples provided with pqs_3_1_0/pqs_3_1_1?
Some examples there showing the advantages of units are:
<libs/pqs/examples/conversion_factor.cpp> <libs/pqs/examples/capacitor_time_curve.cpp> <libs/pqs/examples/lab_example.cpp> <libs/pqs/examples/gravity.cpp> <libs/pqs/examples/fibonacci_optimise-timer.cpp> <libs.pqs/examples/noise_voltage_density.cpp. <libs/pqs/examples/clcpp_response.cpp>
Hi Andy, this is not a good reply to well posed question. You should rather pick only one of those examples, copy/paste a (small) fragment of it, and write reasoning why length::m makes sense. It's even possible that while writing this, you will discover yourself that it doesn't make sense :) I'm sorry about being harsh ... but - you know small piece of code with good comments that are ,,on topic'' of length::m is thousands better than tons of examples without explanation... -- Janek Kozicki |