Re: Getting started - D meta-program question

2009-10-07 Thread downs
Justin Johansson wrote: > Your code as below, using auto to declare a temporary var in an if statement, > ahh, nice, > didn't know that. > > if (auto res = dg(current.data)) > return res; > > What other statement types can you generalized use of auto like this to? > Sadly,

Re: Getting started - D meta-program question

2009-10-04 Thread Justin Johansson
downs Wrote: > Justin Johansson wrote: > > Daniel Keep Wrote: > > > > Just now I've written a bit of CS101 play around code (shown below) for > > constructing a > > singly-linked list of numbers (Conslist idiom). As the code seems to work, > > it looks like > > I've cut my first teeth on "D me

Re: Getting started - D meta-program question

2009-10-04 Thread downs
Justin Johansson wrote: > 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-prog

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: 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