DMD 0.177 release

Lionello Lunesu lionello at lunesu.remove.com
Wed Dec 13 23:21:07 PST 2006


Let's not forget that the members of a struct can be initialized "inline":

struct X {
  int a = 2;
}

This makes the lack of constructors for structs a lot less significant.

Additionally, destructors for structs are primarily used for wrappers, RAII, 
and let's not forget scope(...), which is much better suited for RAII than 
destructors ever were. It makes the lack of destructors for structs a lot 
less significant..

So, if people want a C++-looking initialize function, they can use static 
opCall, and it'll look like a call to a constructor (ie. having the same 
name as the struct).

L. 





More information about the Digitalmars-d-announce mailing list