On Apr 26, 10:33 pm, Stefan Weiss <[email protected]> wrote:
> On 26/04/11 05:08, bemson wrote:
>
> > My name is Bemi Faison. I'm the author of Flow, a framework for
> > defining and executing related functions. (https://github.com/bemson/Flow/
> > )
>
> > I'm of the notion that the concept is more valuable than my
> > implementation. To that end, I have completed the API documentation,
> > and recently updated use-cases. However, I don't have an academic
> > background, and have struggled with how to present and position Flow,
> > in the context of existing programming paradigms.
>
> > I seek assistance with explaining my approach, writing use-cases, and
> > sharing my vision with the JavaScript community. I welcome all
> > comments, critiques, concerns and inquiries.
>
> Looking at this page of code examples -
>
>  https://github.com/bemson/Flow/wiki/Flow-Use-Cases
>
> - it appears that Flow relies on the order in which object properties
> are returned when you iterate over them ("Flow traverses a program
> sequentially (e.g., from first to last)"). If that's correct, you may
> want to rethink your approach.
>
> The language makes no guarantees that the iteration order for properties
> will remain constant, or even predictable. Recent developments in script
> engines (eg, Chrome, Opera and IE) show that engine developers are
> willing to using optimizations which will cause older scripts to break,
> if they mistakenly relied on a certain iteration order.
>
> It may appear to work the way you expect in current browsers, but that's
> just a coincidence, and not something I would use as the basis for a JS
> framework. If you need functions to be executed in a certain order,
> you'd be safer if you used an array.

+1

The order in which properties are returned is also different for
numeric and alphabetic proeprties across browsers, the same goes for
deleted and re-added properties. The properties of Arrays are returned
in different orders for different browsers when using for..in.

The *only* safe way to get properties in a particular order is to
iterate over the numeric properties of an Array using an incrementing
(or decrementing) counter, usually using a for, while or do loop.


--
Rob

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to