Differentiate const flavors using CASE?
Dan
murpsoft at hotmail.com
Thu Mar 22 12:20:20 PDT 2007
A "delegate" is it? Don't you mean "function"? "delegate"s are for classes, and I sure hope that 3 won't become a class.
If we're using functions as iterators, we'd have to use asm { naked; } to prevent ourselves from suffering call stack overhead. Also, what of loop optimization? I suppose it becomes implementation specific now doesn't it?
Well if that's the case, we're pretty close already.
There's syntactic sugar for this:
// inline this
char dansLoopy(char[] s, function x){
}
myString.dansLoopy(x);
Of course, you'd want to make sure x was inlined and didn't rattle the stack (iteratively calling a method 1000 times doing extra push/ pop/ push/ pop/ push/ pop)
Meh.
More information about the Digitalmars-d
mailing list