I said indeed serious problem, although that is indeed debatable.

for in should indeed be used carefully, it's not quite reliable and browsera
all have different behaviours, although chrome's behaviour is the most
unreliable (if we can call it like that) due to the order of elements
returned.

Even though chrome's behaviour is in agreement with the spec it doesn't do
what all the other browsers do.

Now, do we want to strictly follow the spec and Google leaves it like that?
Or do we want it conform to what's already been done, for what? Is it in
order not to break the web, or is it really to gain market share?
Following the spec to stricly might make a browser too different and might
stop adoption (even tho this is only one problem); most people will consider
this a bug and as per spec... What's Google going to do?

I'll stop there, this is an entirely other debate...

Johan Douma
johando...@gmail.com

2009/1/8 <michael.brocking...@bt.com>

>  Any script that relies on an array being ordered, without actually doing
> a   sort()  is seriously . Asdeficient you mentioned yourself, this
> behaviour is entirely  in agreement with the JS spec.
>
> Regards,
> Mike
>
>  ------------------------------
> *From:* li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] *On
> Behalf Of *Johan Douma
> *Sent:* 08 January 2009 11:22
> *To:* wsg@webstandardsgroup.org
> *Subject:* Re: [WSG] Chrome and Safari render the same...or do they?
>
> Just though I'd let you know about this, I actually think this is a pretty
> serious problem, because it breaks a lot of scripts and doesn't conform with
> the other browsers even though it conforms to the javascript spec.
>
> V8 (chrome's js engine) can take the values in an array in a random order.
>
> If we have my_array = new Array("val1","val2","val3","val4", etc... );
> And we loop thru that array with for-in the values might come out as val4,
> val1, val3
>
> The js spec actually says that it can loop thru an array in any order, but
> it actualy should be fixed to conform with other browsers. (
> https://mail.google.com/mail/?zx=zux2r51mnf08&shva=1#label/assoc/11eb4c430f775f2c
> )
>
> Wait and see... Maybe leave a message behind on the bug page to make Google
> fix it.
>
> Johan Douma
> johando...@gmail.com
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> *******************************************************************
>


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to