[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: George J. Carrette <GJC@MIT-MC>
- From: Scott E. Fahlman <Fahlman@CMU-CS-C>
- Date: Tue, 07 Jun 1983 16:11:00 -0000
- Cc: Common-Lisp@SU-AI
- In-reply-to: Msg of 7 Jun 1983 02:03 EDT from George J. Carrette <GJC at MIT-MC>
You ask about the advantages of requiring complex numbers to be
homogeneous in type. You calim that the cost of making this move is
(1) More documentation to read.
(2) More runtime checking when making complex numbers.
(3) Reduction in possible objects to manipulate.
Now, being a mere Lisp hacker and less mathematical than most, I cannot
claim to understand these things, but let me take a stab at listing the
advantages anyway:
(1) Less and simpler documentation to read. Mixed types lead to
complexity in the declaration system, at least. Also, I believe
that users would find mixed-type complexes confusing -- I do.
(2) Possibly greater runtime efficiency. Whenever you operate on a
mixed-type complex (except for addition and subtraction), you have
to do type-contagion at that point. With this restriction,
implementations have the option to do the contagion once, when the
number is created.
(3) Reduction in possible objects to manipulate. With only the useful
complex types around, and not ones that turn into homogeneous types
when you use them but have to be kept in their original form
otherwise, the few remaining types can receive more of the
implementor's attention in the area of making them efficient.
-- Scott