On Sun, 03 Feb 2013 14:56:12 +0100 "bearophile" <[email protected]> wrote: > > The author has used asserts at the beginning of methods, outside > a the pre-condition, this is silly.
Why is it silly? (Genuine question) > Not using foreach loops on > numerical intervals is a waste of fingers and increases the risk > of mistakes, final switches often help you, text() is shorter > than to!string(), Yea, I agree there. Although I've found that the existence of text() is easy to overlook (and if I were looking for it, I'd be looking in std.string, though I realize it makes sense either way). Also, AIUI, "foreach(i; 0..10)" involves a range and function calls, so perhaps they want to be certain there isn't any overhead that accidentally fails to get optimized out? Plus they may be new to D, now be aware of things like "final switch" or exactly which of the advanced features are potentially problematic.
