|  Genny wrote
 
|  Paul> What I would like to get is agreement on the presentation 
|  of constants.
|  
|  You mean macros vs. constant variables vs. inline functions? 
|  This is another thing I didn't understand by looking at the 
|  documentation: the FAQ section seems sometimes to imply you 
|  have already done a choice in this regard;

In the previous review, Boosters suggested strongly different views on
different ways of presenting constants.  As I have tried to explain,
there are pros and cons and valid reasons for wanting all of these.

 for instance:
|  
|   Q. Why not use floating-point hardware constants?
|   A. Because only a few are available, they are often not the right
|      size, are not available on all processors, and most important
|      are sometimes not accurate enough.
|  
|  but then, in another point:
|  
|   Q. Why are functions like double pi() which return constants
|      provided?
|   A. It provides a framework whereby users can plug in special
|      implementation and hardware-specific versions.

Indeed - so the _user_ needs to be able to make the choice,
and this implies that a single representation of constants won't do.

|  "Because some compilers may be able to produce smaller 
|  and/or faster code.(For example, note that MSVC 7 Standard 
|  edition only inlines "__inline", so this will produce slower 
|  and longer code)."
|  
|  Maybe you meant: "because some compilers generate better 
|  code with a manifest constant and others better code with a 
|  function"? 

You could also say that - I'm open to suggestions.

Paul


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to