D - For each syntax sugar
- J Anderson (7/7) Dec 14 2003 char [] a;
- davepermen (7/14) Dec 15 2003 hm.. you're hitting a serious point here, namely the point of implicit a...
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