D - For each syntax sugar
- J Anderson <REMOVEanderson badmama.com.au> Dec 14 2003
- davepermen <davepermen_member pathlink.com> Dec 15 2003
char [] a;
//Parhaps instead of
foreach (int i, char c; a) {}
//This could be used, when we want the standard foreach behavior,
//where the first is the index and the second is the value.
foreach (i, c; a) {}
-Anderson
Dec 14 2003
hm.. you're hitting a serious point here, namely the point of implicit automagic
type deduction (or so:D)... wich is a very interesting way to implement
templates, too...
template max(a,b) { if(a > b) return a; return b; }
similar to C macros actually:D
not sure where that all goes, but its an interesting direction to think about..
In article <brjoa1$1re5$1 digitaldaemon.com>, J Anderson says...
char [] a;
//Parhaps instead of
foreach (int i, char c; a) {}
//This could be used, when we want the standard foreach behavior,
//where the first is the index and the second is the value.
foreach (i, c; a) {}
-Anderson
Dec 15 2003








davepermen <davepermen_member pathlink.com>