Re: Stylistic Preferences



Paul Griffioen wrote:
> On Lisp Programming Style at http://www.lisp.org/table/style.htm I read:
>
> "Use complex numbers to represent points in a plane."
>
> This sounds like something Dijkstra would not approve :) Any explanation why
> this is prefered?
>
> Paul Griffioen

Historically, many tried to use imaginary numbers for many different
things. Some places do need imaginary numbers. Others have switched to
something else (like relativity). Well, some people like fancy stuff,
even when it is not exactly suitable.

Speaking of mathematics:
1) With a=#c(a1,a2), b=#c(b1,b2), do not do by accident a*b, since it
will be a1*b1-a2*b2. Laurentz signature of the space instead of
Eucledian.
2) If your problem domain is purely real, you have to be careful with
getting answers right (read, real answers).
3) My personal opinion is to use complex numbers were they are
*really* needed. Else you get addition problems for no reason in terms
of math. If you do mistake in math, "style"-thing in programing will
not help you.

Speaking of programming:
1) If you screw the math with imaginary thingy, no programming style
will help.
2) Someone said not to waste effort of implementing things twice. I am
sure there should be an already existing package for eucledian vectors
that will do proper math and be a "nice style".

.