Coolest D features

Frits van Bommel fvbommel at
Wed Dec 27 13:11:57 PST 2006

Jeff Nowakowski wrote:
> Walter Bright wrote:
>> I think the problem is that Java is just lacking in some needed 
>> features - like a full set of basic types, simple aggregates, out 
>> parameters, etc. The alternatives are computationally expensive, and 
>> so the optimizer has a lot of work to do to reverse engineer them and 
>> figure out that all the programmer was doing was a workaround for a 
>> POD stack aggregate.
> Could you expand on the above items?

I'm not Walter, but I can answer most of these:

> What basic types are missing?

The unsigned ones,

 > Does a "simple aggregate" refer to structs/tuples?

Structs, probably.

> What does POD stand for, 

Plain Old Data, e.g. ints, chars, floats, C-style structs (that contain 
only POD members).
Classes aren't POD types (in D and Java) because they have virtual 
functions which requires a vtable, disqualifying them.

> and what is a POD stack aggregate?

A POD aggregate stored on the stack if possible, i.e. a C or D struct 
(with only POD members).

 > Could you show a code example in D that performs badly in Java? 
Pardon my ignorance.

Sorry, can't help there. I haven't used Java in a couple of years...

More information about the Digitalmars-d mailing list