How to convert C to D using compiler?
first.last at gmail.com
Fri Dec 10 17:49:44 UTC 2021
On Friday, 10 December 2021 at 02:51:11 UTC, Max Samukha wrote:
> Are you sure it's not a form of Stockholm syndrome? Why is the
> change good?
For sure there is some high degree of Stockholm, with something
as addictive as D. :)
But in this case:
- makes the language and implementation a tiny easier. If it
makes compiler engineers happy then it's a positive (afaik some
wanted to kill builtin complex with fire).
- as a heavy complex number users: you don't really write _that_
much literals often at all. 80% of these complex literals are
zero and one (for which aliases would be maybe nice in
- Complex literals always seemed a little un-D to me:
Complex!double(-2.1039 , 2.6575)
yields less questions about operator priority than:
-2.1039 + 2.6575i
We have to remember cfloat/cdouble/creal also introduced the
Also the i is easily misread in 2.6575i, so there there was
less fanfare about using complex numbers. It falls under "short
syntax for rarely used thing" trap to me.
- a lot of the code using complex numbers separates imaginary and
real values in separate arrays. That, or SIMD code, erase the
More information about the Digitalmars-d