Re: Getting started - D meta-program question

2009-10-03 Thread Justin Johansson
Daniel Keep Wrote: > Justin Johansson wrote: > > There was mention** on the general discussion group that the D > > foreach_reverse > > language construct could be replaced (emulated?) with a (D) meta-program. > > > > ** "Even a novice programmer can write a meta-program to replace > > foreach_r

Re: Sizeof class instance

2009-10-03 Thread Daniel Keep
Daniel Keep wrote: > ... > Note: this is VERY old code, but I have no reason to think it won't > still work. I may need a little dusting off... *It* may need a little dusting off. Argh.

Re: Sizeof class instance

2009-10-03 Thread Daniel Keep
Jarrett Billingsley wrote: > On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote: >> How does one determine the sizeof (in bytes) of an instance of a class in D? >> >> .sizeof works as advertised for structs, but for reference types, >> .sizeof yields the sizeof the referencing variable (effe

Re: Getting started - D meta-program question

2009-10-03 Thread Daniel Keep
Justin Johansson wrote: > There was mention** on the general discussion group that the D foreach_reverse > language construct could be replaced (emulated?) with a (D) meta-program. > > ** "Even a novice programmer can write a meta-program to replace > foreach_reverse without any runtime performan

Getting started - D meta-program question

2009-10-03 Thread Justin Johansson
There was mention** on the general discussion group that the D foreach_reverse language construct could be replaced (emulated?) with a (D) meta-program. ** "Even a novice programmer can write a meta-program to replace foreach_reverse without any runtime performance hit." http://www.digitalmar

Re: Sizeof class instance

2009-10-03 Thread Justin Johansson
Jeremie Pelletier Wrote: > Justin Johansson wrote: > > Jarrett Billingsley Wrote: > > > >> On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote: > >>> How does one determine the sizeof (in bytes) of an instance of a class in > >>> D? > >>> > >>> .sizeof works as advertised for structs, but fo

Re: Sizeof class instance

2009-10-03 Thread Jeremie Pelletier
Justin Johansson wrote: Jarrett Billingsley Wrote: On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote: How does one determine the sizeof (in bytes) of an instance of a class in D? .sizeof works as advertised for structs, but for reference types, .sizeof yields the sizeof the referencing

Re: Sizeof class instance

2009-10-03 Thread Justin Johansson
Jarrett Billingsley Wrote: > On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote: > > How does one determine the sizeof (in bytes) of an instance of a class in D? > > > > .sizeof works as advertised for structs, but for reference types, > > .sizeof yields the sizeof the referencing variable (e

Re: Sizeof class instance

2009-10-03 Thread Jarrett Billingsley
On Sat, Oct 3, 2009 at 5:50 PM, Justin Johansson wrote: > How does one determine the sizeof (in bytes) of an instance of a class in D? > > .sizeof works as advertised for structs, but for reference types, > .sizeof yields the sizeof the referencing variable (effectively same as size > of a pointe

Re: Sizeof class instance

2009-10-03 Thread Jeremie Pelletier
Justin Johansson wrote: How does one determine the sizeof (in bytes) of an instance of a class in D? .sizeof works as advertised for structs, but for reference types, .sizeof yields the sizeof the referencing variable (effectively same as size of a pointer) and not the size of the underlying in

Sizeof class instance

2009-10-03 Thread Justin Johansson
How does one determine the sizeof (in bytes) of an instance of a class in D? .sizeof works as advertised for structs, but for reference types, .sizeof yields the sizeof the referencing variable (effectively same as size of a pointer) and not the size of the underlying instance. I did try scannin