bearophile wrote: > A better question can be: "What's the advantage of having a built-in > imaginary type?" :-) > You can find an answer here, from page 11: > http://www.eecs.berkeley.edu/~wkahan/JAVAhurt.pdf > But maybe those ideas aren't much true anymore today.
Why could you not make a struct imaginary, with complex defined by something like: struct complex(T) { T re; imaginary(T) im; … } This can get you all the benefits Kahan talks about. —Joel Salomon