[OT] The Usual Arithmetic Confusions
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Fri Feb 4 10:22:23 UTC 2022
On Friday, 4 February 2022 at 09:45:31 UTC, Paulo Pinto wrote:
> Then again, maybe Sun lacked enough people with decades of C
> and C++ experience, and someone with the track record of
> Gosling across the computing industry does have any clue about
> what he was talking about.
I learned about 1s- and 2s-complement at high school in the
context of digital circuits, but I guess that is unusual.
Regardless, it might take a decade of system level programming to
get good intuition of C semantics, on that we can agree. Maybe we
also can agree that most D programmers have no use for that.
And well, why should they? The details are primarily useful for
very low level trickery and error-prone bit manipulation. With a
good standard library this should not be needed often. Also, with
the availability of SIMD I find bithacks to be of very low
utility. Prior to SIMD I sometimes used unsigned bit hacks to
emulate SIMD (for image processing), but that is arcane at this
point in time. I only do such things on the rare occasion where I
want to create a high precision phasor (oscillator) or treat
floats as bit-vectors. Most programmers don't need this
knowledge, they just need a good library.
Anyways, it is a poor strategy to require C-like proficiency as
that actually makes it easier for D programmers to transition to
C++!
D needs to evolve towards simplicity, that is the main advantage
it can obtain over C++ and Rust.
More information about the Digitalmars-d
mailing list