From -61176353936054325
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7b33df5790e7ad92
X-Google-Attributes: gidf78e5,public
From: James Kuyper <kuyper@wizard.net>
Subject: Re: complex design flaw (#1)
Date: 1999/03/15
Message-ID: <36EC0E2F.C317A434@wizard.net>#1/1
X-Deja-AN: 455095821
X-NNTP-Posting-Host: 209.8.153.20
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <x88pv6fok3r.fsf@nbeckerpc.hns.com> <xaj3e3be4pu.fsf@korrigan.inria.fr> <01be6cf4$9f3dcc80$7d9cd4c7@danielp.interlog.com> <xaj7lslx75y.fsf@korrigan.inria.fr>
X-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=us-ascii
X-Trace: news6.ispnews.com 921439639 209.8.153.20 (Sun, 14 Mar 1999 14:27:19 EDT)
Organization: Not Enough
Mime-Version: 1.0
NNTP-Posting-Date: Sun, 14 Mar 1999 14:27:19 EDT
Newsgroups: comp.std.c++
Originator: clamage@taumet


Gabriel Dos_Reis wrote:
> "Daniel Parker" <danielp@no_spam.com> writes:
....
> | through to achieve that goal.  Being handed unnecessary favors like _FLT r
> | = 0, _FLT i = 0 is not what the numerical programmer wants.  And the
> | original point is valid:  if that's not how double or int behaves, why
> | should it be how complex behaves?
> 
> Because it is not int nor double?

By that same argument, there's no reason for double to be treated the
same as int, since it's not an int. In many ways double is more similar
to complex than it is to int.

complex<> is defined as an implementation-defined class, but that's not
the only way it could have been done. In Fortran and in C9X, it's a
fundamental type. In C9x, complex will obey the same initialization
rules as the other built-in types. Even as a class type, the default
constructor for complex<> could have been defined to leave it's members
uninitialized, just like the built-in types.

> See -- C compitibility.

Could you be more specific? I didn't find any reference to complex in
the "C compatibility" Annex.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




