Re: Peano Arithmetic

2008-08-15 Thread Jason Orendorff
On Fri, Aug 15, 2008 at 12:22 AM, Michael Haufe [EMAIL PROTECTED] wrote: I apologize if this issue was discussed already, I've been unable to find an answer after a few hours of digging and Googling. I was watching some old SICP videos and translating some of the code into JavaScript to see

Iteration in ES4

2008-04-25 Thread Jason Orendorff
Here are some more comments on iteration in ES4; still more to come. === for-each on Array objects === The planned behavior, as far as I can discern it, is like this: - Properties will be visited in the order they were added. - Enumerable properties of Array.prototype will be visited.

Re: ES4 draft: enumerability

2008-04-24 Thread Jason Orendorff
The iterator proposal: http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators is out of date or seems contradictory in several places: * Do implementations have to provide the primitives in the magic namespace? In one place, the proposal says, The magic::getEnumerableIds

Re: ES4 draft: enumerability

2008-04-22 Thread Jason Orendorff
On 2008/4/10, Lars Hansen [EMAIL PROTECTED] wrote: Here's the first draft explaining how enumeration works in ES4. * It's unclear which parts of this, if any, are intended to be normative. * Are the terms enumeration, iteration, and itemization defined somewhere? Even if they are, I can't

Re: Generator use-cases

2008-03-30 Thread Jason Orendorff
On Fri, Mar 28, 2008 at 10:32 PM, Brendan Eich [EMAIL PROTECTED] wrote: This is a long-ish case for including generators in ES4 as proposed. [...] Here's a brief case: generators let you factor a complex loop, dividing the value-producing part from the value-consuming part. Neither part has to

Re: Primitives vs. Objects, Ruby-like features

2008-03-28 Thread Jason Orendorff
On Mon, Mar 24, 2008 at 9:43 PM, Darryl [EMAIL PROTECTED] wrote: typeof(1) == number typeof(new Number(1)) == object [...] Will these be made uniform in JS2? No, it would be a pretty big breaking change from ES3. ES4 is considering several small breaking changes, but nothing this major. I

Re: Expanded function syntax

2008-02-05 Thread Jason Orendorff
On Jan 31, 2008 5:08 PM, Mark Filipak [EMAIL PROTECTED] wrote: What I have to write now: getFirstChildOfElementWithTagName(Papa, 'baby'); If you're not writing something like $(baby:first, Papa), you're missing out on what the language already has to offer. -j

Re: Namespaces in ECMA

2007-07-15 Thread Jason Orendorff
On 7/15/07, Alexandre Bergel [EMAIL PROTECTED] wrote: The notion of namespace of ECMA 4 is very interesting. I spent some time in reading the new javascript description [1]. I try to understand whether a stack of namespace is present or not at runtime. [...] Thanks for the question. You're