On 8/16/2010 8:16 PM, David Simcha wrote: > 3. Stuff related to static arrays. > > How do we want to handle the static array case, long term? IMHO stuff in > std.range and std.algorithm should generally* not *support static arrays > because > in addition to being a PITA to > implement, since static arrays are usually stack allocated, > using them as ranges is inherently unsafe.
In your code they might tend to be stack based, but static arrays inside classes is a perfectly valid and frequent enough use case (extrapolating from non-d usage on my part since I've done rather little d coding to date) that I wouldn't rule them out. I do agree that for the stack case, there's risk of misuse. For the safe-d subset of the language, that's a problem, but phobos isn't restricted to the subset and so shouldn't go out of its way to make life hard for doing work outside that subset. That said, I don't think it's a big burden to push the problem to the developer to just take a slice over the static array when passing it to a std.algorithm. My 2 cents, Brad _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
