Sebastian Werner <[EMAIL PROTECTED]> writes: > Am 19.03.2007 um 12:24 schrieb Andreas Junghans: >> >> I agree with Derrell here - please don't change the Array prototype >> (much less without a _very_ strong warning to developers). > > I don't agree. As mentioned above, I really don't see many useful > cases, where this is even relevant. The convenience is a much > stronger argument in my opinion. If we could simply say, that one can > use all JS 1.6 language features is unbeatable (compared to "...maybe > you can, but...")
Yes, you can use JS 1.6 features that you wouldn't otherwise be able to use, at the expense of killing language features that have existed since well prior to 1.6 (for .. in). It seems really silly to break the core language to gain dubiously necessarily functionality. Although my use of for..in in fsm was unnecessary and was a remnant of when the array I was iterating was previously an object, Andreas' explanation of iterating a sparse array is a good and perfectly reasonable use of for..in that should not be removed without the developer's explicit request. I have less objection to providing a switch that enables the JS 1.6 compatibility, but having it on by default and breaking the language as a result in the still-very-common IE6 seems very much like the wrong way to do it. I would much prefer static methods in qx.lang.Array that would serve the same purpose but be passed the array to operate on. It's not significantly less convenient to call a static method for the occasional time these features are needed. They could use the native method if available, or the replacement if not. Derrell ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
