(j3.2006) Asymmetry of REAL, CMPLX

Dan Nagle dannagle
Tue Jan 8 15:50:02 EST 2008


Hello,

On Jan 8, 2008, at 3:36 PM, Robert Corbett wrote:

> Van Snyder wrote:
>> On Mon, 2008-01-07 at 20:27 -0800, Robert Corbett wrote:
>>
>>> I am one of those who proposed providing a new intrinsic spelled
>>> COMPLEX that would be symmetric.  In what sense does it not solve
>>> the problem?
>>
>>
>> The problem is the surprise caused by the asymmetry of REAL and  
>> CMPLX.
>> This negatively affects reliability and economics.
>
> Yes, but if the standard, over time, replaces CMPLX with a symmetric
> routine named COMPLEX, the problem goes away as far as the standard
> is concerned. Implementations would be forced to support the then
> nonstandard intrinsic CMPLX, but the standard would be clean.

I favor Bob's approach.  We cannot introduce an incompatibility,
and call it a fix, for so small a reason as perceptions of symmetry.

Besides, as Bill remarked, one may also view cmplx() as a component
extractor, a la %re and %im.  It is these *two* views that mean
that someone will be "surprised" no matter what.  So let's do nothing
for f08.

-- 
Cheers!

Dan Nagle






More information about the J3 mailing list