Re: Stylistic Preferences
- From: "Mikalai" <mbirukou@xxxxxxxxx>
- Date: 19 Jan 2006 15:45:10 -0800
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".
.
- Follow-Ups:
- Re: Stylistic Preferences
- From: Joe Marshall
- Re: Stylistic Preferences
- From: mmcconnell17704
- Re: Stylistic Preferences
- From: William D Clinger
- Re: Stylistic Preferences
- References:
- Stylistic Preferences
- From: Paul Griffioen
- Stylistic Preferences
- Prev by Date: Re: set like table
- Next by Date: Re: set like table
- Previous by thread: Re: Stylistic Preferences
- Next by thread: Re: Stylistic Preferences
- Index(es):