Give struct the status it deserves
Hong
Hong_member at pathlink.com
Sat Mar 25 22:21:53 PST 2006
Thanks, that is one work arounds, the avoidance approach.
There are 2 approaches to structs,
1. Minimalist approach, use structs only for C interfaces, and tiny data types
such as Point for GUI programming. Most Java programmer would prefer this.
2. Use structs for all data structures that do not require heap allocation, such
as containers. MinTL is a good example. However, current support for struct
makes this approach difficult. People used to C++ might prefer this approach,
when performance is critical. If D is to gain a foot hold on the high
performance computing world, such as scientific computing, more support for
struct will be needed.
In article <e044ro$ifn$1 at digitaldaemon.com>, Hasan Aljudy says...
>
>structs are a light wieght alternative to classes.
>Seriously, if structs don't suffice for your needs, use classes! You
>won't lose /that/ much performance.
More information about the Digitalmars-d
mailing list