←back to thread

288 points Twirrim | 2 comments | | HN request time: 0.455s | source
Show context
WalterBright ◴[] No.41875254[source]
D made a great leap forward with the following:

1. bytes are 8 bits

2. shorts are 16 bits

3. ints are 32 bits

4. longs are 64 bits

5. arithmetic is 2's complement

6. IEEE floating point

and a big chunk of wasted time trying to abstract these away and getting it wrong anyway was saved. Millions of people cried out in relief!

Oh, and Unicode was the character set. Not EBCDIC, RADIX-50, etc.

replies(6): >>41875486 #>>41875539 #>>41875878 #>>41876632 #>>41878715 #>>41881672 #
bmacho ◴[] No.41878715[source]
> D made a great leap forward

> and a big chunk of wasted time trying to abstract these away and getting it wrong anyway was saved. Millions of people cried out in relief!

Nah. It is actually pretty bad. Type names with explicit sizes (u8, i32, etc) are way better in every way.

replies(1): >>41884134 #
1. WalterBright ◴[] No.41884134[source]
> Type names with explicit sizes (u8, i32, etc) are way better in every way

Until one realizes that the entire namespace of innn, unnn, fnnn, etc., is reserved.

replies(1): >>41895432 #
2. bmacho ◴[] No.41895432[source]
You are right, they come with a cost.