Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!decvax!ima!haddock!karl From: karl@haddock.UUCP (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Complex type ? Message-ID: <480@haddock.UUCP> Date: Thu, 7-May-87 11:07:36 EDT Article-I.D.: haddock.480 Posted: Thu May 7 11:07:36 1987 Date-Received: Sat, 9-May-87 09:09:47 EDT References: <7264@brl-adm.ARPA> <1148@ius2.cs.cmu.edu> Reply-To: karl@haddock.ISC.COM.UUCP (Karl Heuer) Organization: Interactive Systems, Boston Lines: 17 Summary: use c++ In article <1148@ius2.cs.cmu.edu> edw@ius2.cs.cmu.edu (Eddie Wyatt) writes: |In article <7264@brl-adm.ARPA>, lyle@ads.arpa (Lyle Bacon) writes: |>C is an evolving language. I will make a possibly sacrilegious suggestion |>that the type "complex" be incorporated. After all, such a type is now a |>part of LISP (Common). [Using a struct complex is inelegant because] the |>resultant code form using structures and functions is much less readable and |>harder to check. | |Sounds like you should be programming in ADA or some other data abstract |language. I would recommend C++. It's almost entirely upward compatible with C, and allows you to assign operator semantics for new types. This has already been done for "complex", so you can write "z = z1 * z2 * z3" which seems to be what you want. (Also, this will generate inline code, not a function call.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint