|
From: James W. W. <ja...@wr...> - 2004-11-30 18:38:52
|
"Lane Roathe" <la...@if...> wrote: >Why? Any operation that you would want to overload should be able to >become an inlined function call just as easily. The actual operation code >remains nearly identical. (at least in my experience.) > >>From someone who's still trying to get the latest builds to work in my >products, I'd rather see easily read/understood/maintainable code. The >more programmers who can read the code and _really_ understand what's >happening the more contributions to that code base you will get. Using overloaded operators for vector addition and scalar-times-vector multiplication results in code that is closer to mathematical notation, which to me makes it easier to read. Multiplication of vectors is more doubtful, since math has dot and cross products while C++ has only one * operator. -- James W. Walker, ScriptPerfection Enterprises, Inc. <http://www.write-brain.com/> |