division of objects into classes and structures is bad

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 30 11:23:25 PST 2008

Weed wrote:
[about structs vs. classes]
> It is very a pity.
> My small opinion: it is impossible to reduce performance for struggle
> against potential errors - such languages already are, it more
> high-level. It how to refuse pointers because they are dangerous,
> difficult for beginners and without them it is possible to make any
> algorithm.

It's attractive to deal in absolutes, but also dangerous. When C came 
about, naysayers complained that it was consistently 30% slower than 
assembler, and generated larger code by an even higher margin. Then, 
some asked, what would you choose, one OS that's cool because it's 
written in C, or one that's one third faster? and so on. What people 
have forgotten by now is that C *was* high level. And it *did* incur a 
performance hit. It also had desirable properties that overcame that hit.

> What is D?
> D is a general purpose systems and applications programming language. It
> is a higher level language than C++, but *retains* the ability to write
> high performance code and interface directly with the operating system
> API's and with hardware.
> http://www.digitalmars.com/d/2.0/overview.html

Probably the worst thing that could happen to that description is it 
Kafka-esquely morphing into a dogma.


More information about the Digitalmars-d mailing list