Parsing allowed convenience in simple modules

2011-01-03 Thread John J. Barton
In http://wiki.ecmascript.org/doku.php?id=strawman:simple_modules it says: Module declarations are only allowed at the top level of a script or module, but for convenience, they can nest within top-level blocks, and are hoisted to be in scope for the entire containing script or module. Can

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread John J. Barton
On 3/14/2011 10:08 PM, Brendan Eich wrote: On Mar 14, 2011, at 11:50 PM, John J. Barton wrote: On 11:59 AM, Brendan Eich wrote: However, there's no way for a generator function to return that instance, because a generator function always implicitly returns a fresh generator iterator when

Re: Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread John J. Barton
On 11:59 AM, Dmitry A. Soshnikov wrote: Moreover, forgot to mention. Passing the generator function (g-function and g-object for shortness) as an argument for the `Generator` constructor is not good for dynamically bound `this` value (notice, that in Python's `self` is just a casual

Re: Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread John J. Barton
On 11:59 AM, David Herman wrote: P.S.: A small change, e.g. can be to make next as a getter since it doesn't accept arguments. g.next; // 1 g.next; // 2 But, it's a cosmetic and actually not so needed change. -1 The purpose of the next interface is to change the state of the iterator. A

Re: Re: Bringing setTimeout to ECMAScript

2011-03-20 Thread John J. Barton
On 11:59 AM, Boris Zbarsky wrote: Nowadays the clamp is there because sites use |setTimeout(f, 0)| when they really mean run this at 10Hz and if you run it with no delay then they swamp your event loop and possible render wrong (e.g. the text disappears before the user has a chance to read

Re: Bringing setTimeout to ECMAScript

2011-03-20 Thread John J. Barton
On 3/20/2011 12:03 PM, Kyle Simpson wrote: ... Multiple repeated calls to |setTimeout(f,0)| are bugs I don't agree with that assertion at all. Two different functions might queue up two different snippets to happen as soon as possible, later, each of them using their own setTimeout(..., 0).

Re: Re: Optional : in ?: operator [was: Existential operator]

2011-04-14 Thread John J. Barton
On 11:59 AM, Kyle Simpson wrote: Brendan, you've asked for other coding examples where I use the pattern of some variable being `undefined` or not to trigger different behavior (that is, to use the variable or not). Here's two more: Here are some examples from Firebug code: Lazy object

Re: Optional : in ?: operator [was: Existential operator]

2011-04-14 Thread John J. Barton
On 4/14/2011 8:17 AM, Brendan Eich wrote: On Apr 14, 2011, at 5:03 PM, John J. Barton wrote: On 11:59 AM, Kyle Simpson wrote: Brendan, you've asked for other coding examples where I use the pattern of some variable being `undefined` or not to trigger different behavior (that is, to use

Re: Existential operator

2011-04-14 Thread John J Barton
P T Withington wrote: On 2011-04-14, at 11:55, John J. Barton wrote: Perhaps there is no better solution, but often I find that I want to say "call this chain of functions and use the bottom value, but if any of them return undefined, then just be undefined, don't get all p

Re: Re: Existential operator

2011-04-14 Thread John J Barton
Asen Bozhilov wrote: Dmitry A. Soshnikov: which in sugar form is: var vars = context.getPanel?("html", true).getInspectorVars(); I don't think this is real use case. It seems like a design mistake. Why would you check for existence "html" panel? If the "html" panel

Re: Existential operator

2011-04-15 Thread John J. Barton
On 4/15/2011 5:09 AM, Asen Bozhilov wrote: John J Barton: The HTML tab you see in the Firebug tab set is just a picture, there is no real HTML panel. All of Firebug's panels are actuallydiv elements allocated on demand. So the code above is saying: If the user has ever used the HTML

Re: Re: Function Syntax

2011-05-11 Thread John J. Barton
On 11:59 AM, Allen Wirfs-Brock wrote: On May 10, 2011, at 4:53 PM, Douglas Crockford wrote: I look at ECMAScript as serving four groups: 1. The beginners for whom the language was designed. 2. The web developers who owe their livelihoods to the language. 3. The scientists who will use the

Re: Re: prototype for operator proposal for review

2011-05-18 Thread John J Barton
Allen Wirfs-Brock wrote: On May 17, 2011, at 11:59 PM, Luke Hoban wrote: And of course this would also make it harder for IDEs and such to give good first-class syntax highlighting here, because the syntax for this would be ambiguous with user-created stuff.

Clean scope

2011-08-17 Thread John J Barton
JavaScript's ability to close over variables in nesting scopes sometimes surprises me. I'd like to be able to say function uses a clean scope. Is there something like this in the works? Or maybe it exists? Thanks, jjb ___ es-discuss mailing list

Re: Clean scope

2011-08-17 Thread John J Barton
mean a scope with JavaScript built-ins only, no 'host' functions, no |window| properties. function walkTheWalk(position) { use empty; var from = parent.location; // error, should have said position.parent, but it works?!? } -- kangax On Wed, Aug 17, 2011 at 11:50 AM, John J Barton

Re: Clean scope

2011-08-17 Thread John J Barton
On Wed, Aug 17, 2011 at 4:15 PM, Brendan Eich bren...@mozilla.com wrote: Mozilla has evalInSandbox built-ins. Unfortunately I have quite a lot of experience with evalInSandbox. We've talked about them, but no one has produced a strawman based on this work. The module loader API:

Dynamic compilation, including eval and script tag insertion (was Re: Clean scope)

2011-08-17 Thread John J Barton
On Aug 17, 2011, at 4:39 PM, Brendan Eich wrote: On Aug 17, 2011, at 4:25 PM, John J Barton wrote: On Wed, Aug 17, 2011 at 4:15 PM, Brendan Eich bren...@mozilla.com wrote: Mozilla has evalInSandbox built-ins. Unfortunately I have quite a lot of experience with evalInSandbox. If you mean

Subject: Re: Harmony - proxies | asynchronous

2011-09-02 Thread John J Barton
I'm pretty puzzled by this discussion and I'm guessing other folks might be puzzled as well. Since I understood node fibers as thread for Node, the discussion I read is: /be: You can have threads! Mikeal: We don't want threads! If I'm on the right track, then I should understand how this

Re: Subject: Re: Harmony - proxies | asynchronous

2011-09-02 Thread John J Barton
On Fri, Sep 2, 2011 at 3:48 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 2, 2011, at 2:26 PM, John J Barton wrote: I'm pretty puzzled by this discussion and I'm guessing other folks might be puzzled as well. Since I understood node fibers as thread for Node, the discussion I read

Re: Subject: Re: Harmony - proxies | asynchronous

2011-09-04 Thread John J Barton
On Fri, Sep 2, 2011 at 4:39 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 2, 2011, at 4:15 PM, John J Barton wrote: Ok I hope someone creates more tutorial information about generators. I read about them and played around with some examples, but I did not come away thinking positive

Re: Subject: Re: Harmony - proxies | asynchronous

2011-09-05 Thread John J Barton
On Sun, Sep 4, 2011 at 1:42 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 4, 2011, at 11:06 AM, John J Barton wrote: As a reader I have to parse the function carefully to look for the 'yield'. If I find one, then I know that this is not actually a function after all. Then I need

Re: Subject: Re: Harmony - proxies | asynchronous

2011-09-06 Thread John J Barton
On Mon, Sep 5, 2011 at 11:01 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 5, 2011, at 9:36 PM, John J Barton wrote: ... Assuming I am understanding the idea, then my description above is also my criticism: control and data flow is jumping around in unusual ways and functions morph

Re: IDE support?

2011-09-12 Thread John J Barton
On Mon, Sep 12, 2011 at 12:00 PM, es-discuss-requ...@mozilla.org wrote: Some of the discussion on this thread amounts to IDEs work great for typed languages so let's make JS typed. What if we started with What would be great for JavaScript developers? Then we would not waste a lot of time

Re: IDE support?

2011-09-12 Thread John J Barton
From: François REMY fremycompany_...@yahoo.fr To: es-discuss@mozilla.org Date: Mon, 12 Sep 2011 22:31:17 +0200 Subject: Re: IDE support? Types are not only desirable to borrow concepts from current IDEs. We know from DotNET that a language running in a VM can be pretty fast, close to a

Re: IDE support?

2011-09-13 Thread John J Barton
On Tue, Sep 13, 2011 at 12:26 AM, Brendan Eich bren...@mozilla.com wrote: On Sep 12, 2011, at 12:22 PM, John J Barton wrote: On Mon, Sep 12, 2011 at 12:00 PM,  es-discuss-requ...@mozilla.org wrote: Some of the discussion on this thread amounts to IDEs work great for typed languages so let's

Re: IDE support?

2011-09-13 Thread John J Barton
Just to point out that Web Inspector in the Chrome browser has run time dot completions (as does Firebug) and it has live JS and CSS editing with save to file. I won't defend the user experience, that needs work. I tried and failed to convince one IDE team that starting from the runtime tools was

Re: IDE support?

2011-09-16 Thread John J Barton
[in JS] ... and gives strictly more information (and more relevant information!) sentence. I should have written static+dynamic gives strictly more information. Sorry about that -- not a profound point, but something that came out in the exchange John J. Barton and I had about static program

Re: A variation of Allen’s Class Definition Pattern

2011-09-25 Thread John J Barton
On Sun, Sep 25, 2011 at 8:18 PM, Brendan Eich bren...@mozilla.com wrote: ... and it is imperative as all get-out. I realize this is supposed to be common knowledge, but I would appreciate a pointer to why 'imperitive' gets listed as a negative. In my experience declarative is only good for toy

Re: Sep 27 meeting notes

2011-09-30 Thread John J Barton
On Fri, Sep 30, 2011 at 5:47 PM, Axel Rauschmayer a...@rauschma.de wrote: Isn't it just a matter of referring to the property with super? class Pirate {   get name() {     return Captn' + super.name;   } } just trying to understand: how is super different from __proto__? jjb

Re: Sep 27 meeting notes

2011-09-30 Thread John J Barton
, at 7:38 PM, John J Barton wrote: On Fri, Sep 30, 2011 at 5:47 PM, Axel Rauschmayer a...@rauschma.de wrote: Isn't it just a matter of referring to the property with super? class Pirate {   get name() {     return Captn' + super.name;   } } just trying to understand: how is super different

Re: Super-calls

2011-10-01 Thread John J Barton
On Sat, Oct 1, 2011 at 8:22 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 1, 2011, at 4:23 PM, Lasse Reichstein wrote: On Sat, Oct 1, 2011 at 2:16 PM, Axel Rauschmayer a...@rauschma.de wrote: Then a super-call is always about letting this stay the same, but finding a later method: If

Re: On Incremental Updates

2011-10-04 Thread John J Barton
On Mon, Oct 3, 2011 at 9:18 PM, Russell Leggett russell.legg...@gmail.comwrote: As much as every JavaScript advocate usually cringes at the comparison of JavaScript to Java, it is a little funny that right now I think they are in a little bit of the same situation. The JVM and JavaScript are

Re: On I got 99 problems and JavaScript syntax ain't one

2011-10-04 Thread John J Barton
+1 On Tue, Oct 4, 2011 at 10:52 AM, Mikeal Rogers mikeal.rog...@gmail.comwrote: Maybe it's time for me to chime in. While I find it facilitating that so much meaning is being found in my tweet I thought it might be productive to say what I actually meant by the comment. JavaScript's

Re: On I got 99 problems and JavaScript syntax ain't one

2011-10-04 Thread John J Barton
On Tue, Oct 4, 2011 at 12:59 PM, Bob Nystrom rnyst...@google.com wrote: A constructor is different from a regular function. Instead of returning the value that the body of the function returns, it returns a special newly-created object. Sorry, already you lost me ;-) I guess you mean the

traits feedback

2011-10-04 Thread John J Barton
In trying to update my JS approach I looked into 'traits'. I'm still on the fence about using them at this stage, but MarkM was asking for feedback of pretty much any kind so here is a little. I believe I understand traits for the most part just from the info on the Web site: http://traitsjs.org/

Re: On I got 99 problems and JavaScript syntax ain't one

2011-10-05 Thread John J Barton
On Tue, Oct 4, 2011 at 2:33 PM, Bob Nystrom rnyst...@google.com wrote: On Tue, Oct 4, 2011 at 2:12 PM, John J Barton johnjbar...@johnjbarton.com wrote: On Tue, Oct 4, 2011 at 12:59 PM, Bob Nystrom rnyst...@google.com wrote: A constructor is different from a regular function. Instead

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-05 Thread John J Barton
On Tue, Oct 4, 2011 at 10:26 AM, Mike Samuel mikesam...@gmail.com wrote: 2011/10/4 Russell Leggett russell.legg...@gmail.com: On Tue, Oct 4, 2011 at 12:51 PM, Mike Samuel mikesam...@gmail.com wrote: No it doesn't. Just walk the object graph starting from the root object and let the

Re: traits feedback

2011-10-05 Thread John J Barton
, and in those cases I think you might be better off without OOP anyway. jjb Cheers, Tom 2011/10/5 John J Barton johnjbar...@johnjbarton.com In trying to update my JS approach I looked into 'traits'. I'm still on the fence about using them at this stage, but MarkM was asking for feedback

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 7:49 AM, Russell Leggett russell.legg...@gmail.comwrote: On Wed, Oct 5, 2011 at 10:32 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Tue, Oct 4, 2011 at 10:26 AM, Mike Samuel mikesam...@gmail.com wrote: 2011/10/4 Russell Leggett russell.legg

Re: traits feedback

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 8:21 AM, Dean Landolt d...@deanlandolt.com wrote: On Wed, Oct 5, 2011 at 10:48 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 5, 2011 at 12:52 AM, Tom Van Cutsem tomvc...@gmail.comwrote: Thanks for the feedback, John. I have to admit

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 8:05 AM, Russell Leggett russell.legg...@gmail.comwrote: On Wed, Oct 5, 2011 at 10:52 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 5, 2011 at 7:49 AM, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Oct 5, 2011 at 10:32 AM, John

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 8:57 AM, Russell Leggett russell.legg...@gmail.comwrote: On Wed, Oct 5, 2011 at 11:48 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: Here again I am not sure how we ended up with this conversation but you can find a function able to extract properties and

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 9:11 AM, Russell Leggett russell.legg...@gmail.comwrote: On Wed, Oct 5, 2011 at 11:49 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 5, 2011 at 8:05 AM, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Oct 5, 2011 at 10:52 AM, John

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 2:25 PM, Russell Leggett russell.legg...@gmail.comwrote: On Wed, Oct 5, 2011 at 1:18 PM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 5, 2011 at 9:11 AM, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Oct 5, 2011 at 11:49 AM, John J

Re: traits feedback

2011-10-05 Thread John J Barton
On Tue, Oct 4, 2011 at 8:56 PM, John J Barton johnjbar...@johnjbarton.comwrote: In trying to update my JS approach I looked into 'traits'. I'm still on the fence about using them at this stage, but MarkM was asking for feedback of pretty much any kind so here is a little. I believe I

Re: traits feedback

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 8:02 PM, Juan Ignacio Dopazo dopazo.j...@gmail.comwrote: On Wed, Oct 5, 2011 at 10:36 PM, Jake Verbaten rayn...@gmail.com wrote: Object.create does indeed require propertydescriptors as the second argument. This is the easiest way to send meta-data like read-only.

Re: traits feedback

2011-10-05 Thread John J Barton
On Wed, Oct 5, 2011 at 8:44 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 5, 2011, at 8:21 PM, John J Barton wrote: I think what's missing is Object.extend: http://www.prototypejs.org/api/object/extend http://api.jquery.com/jQuery.extend/ http://dojotoolkit.org/reference-guide/dojo

Re: traits feedback

2011-10-06 Thread John J Barton
On Wed, Oct 5, 2011 at 10:37 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 5, 2011, at 9:02 PM, John J Barton wrote: PrototypeJS (and Firebug) pre-date Object.keys() and .hasOwnProperty(), hasOwnProperty was in ES3 in 1999. PrototypeJS is IIRC 2005-era. Firebug is post-y2k. so

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-06 Thread John J Barton
repeated with less quotation On Wed, Oct 5, 2011 at 2:25 PM, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Oct 5, 2011 at 1:18 PM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 5, 2011 at 9:11 AM, Russell Leggett russell.legg...@gmail.com wrote

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-06 Thread John J Barton
On Thu, Oct 6, 2011 at 6:40 PM, Brendan Eich bren...@mozilla.com wrote: You are a gmail user, I surmise. So are others. Gmail collapses cited text, so you don't trim it. Those of us using other mail user agents then have to wade through *pages* of cited text to find your replies, which

Object.extends (was Re: traits feedback)

2011-10-06 Thread John J Barton
On Thu, Oct 6, 2011 at 8:04 PM, Andrew Dupont mozi...@andrewdupont.netwrote: (Keep in mind that the 80% use-case for this sort of thing is merging default options with user-supplied options, at least in the code I write. That's a simple case that usually involves merging two plain objects

Re: Object.extends (was Re: traits feedback)

2011-10-07 Thread John J Barton
Several people advocate Object.extend() that copies only own properties. I don't understand why; I'll make the case for copying all properties. At a call site I use, say foo.bar(); Ordinarily I should not be concerned about details of bar()'s implementation. In particular I should not be

Re: es-discuss Digest, Vol 56, Issue 57

2011-10-07 Thread John J Barton
On Fri, Oct 7, 2011 at 8:34 AM, Axel Rauschmayer a...@rauschma.de wrote: *From: *John J Barton johnjbar...@johnjbarton.com *Subject: **Re: Object.extends (was Re: traits feedback)* *Date: *October 7, 2011 16:49:50 GMT+02:00 *To: *Quildreen Motta quildr...@gmail.com *Cc: *John-David Dalton

Re: Object.extends (was Re: traits feedback)

2011-10-07 Thread John J Barton
On Fri, Oct 7, 2011 at 9:23 AM, Axel Rauschmayer a...@rauschma.de wrote: If you do something like var fuz = Object.extend(foo, {paper:'in', shoes:'my'}); Then fuz will get all properties of Object.prototype, again, as duplicates. In the above, you are clearly most interested in what you

Re: Object.extends (was Re: traits feedback)

2011-10-07 Thread John J Barton
On Fri, Oct 7, 2011 at 9:16 AM, Quildreen Motta quildr...@gmail.com wrote: 2011/10/7 John J Barton johnjbar...@johnjbarton.com On Fri, Oct 7, 2011 at 8:34 AM, Axel Rauschmayer a...@rauschma.dewrote: If you do something like var fuz = Object.extend(foo, {paper:'in', shoes:'my

Re: Object.extends (was Re: traits feedback)

2011-10-07 Thread John J Barton
On Fri, Oct 7, 2011 at 10:04 AM, Axel Rauschmayer a...@rauschma.de wrote: Sorry to be dense, but I still don't get it. How can an object have duplicate properties? I understand that own properties override properties on prototypes. When you look at the object literal var source = {

Re: Object.extends (was Re: traits feedback)

2011-10-07 Thread John J Barton
On Fri, Oct 7, 2011 at 11:08 AM, Axel Rauschmayer a...@rauschma.de wrote: I don’t see a simple way of “fixing” (property descriptors do have their uses) Object.create(). Just allow the second argument to be property descriptor *or* object. Problem: property descriptors are

Re: Object.extends (was Re: traits feedback)

2011-10-07 Thread John J Barton
On Fri, Oct 7, 2011 at 12:13 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 7, 2011, at 9:23 AM, Axel Rauschmayer wrote: ... I would prefer the name Object.copyOwnPropertiesTo(source, target) or Object.copyOwnTo(source, target) to the name “extend” (which, to me, suggests

Re: Grawlix

2011-10-09 Thread John J Barton
On Fri, Oct 7, 2011 at 11:26 AM, Axel Rauschmayer a...@rauschma.de wrote: *From: *Allen Wirfs-Brock al...@wirfs-brock.com +1 Bottom line, I disagree with John J's initial premise about the path we are on. I also am convinced that for all design choices we make(I'm not just talking

Re: traits feedback

2011-10-10 Thread John J Barton
On Mon, Oct 10, 2011 at 11:59 AM, Tom Van Cutsem tomvc...@gmail.com wrote: 2011/10/6 Brendan Eich bren...@mozilla.com On Oct 5, 2011, at 9:02 PM, John J Barton wrote: The traits philosophy is that, when merging objects, you want to see name clashes flagged as exceptions (to prevent

Re: traits feedback

2011-10-10 Thread John J Barton
On Mon, Oct 10, 2011 at 1:45 PM, Dean Landolt d...@deanlandolt.com wrote: On Mon, Oct 10, 2011 at 4:13 PM, John J Barton johnjbar...@johnjbarton.com wrote: On Mon, Oct 10, 2011 at 11:59 AM, Tom Van Cutsem tomvc...@gmail.comwrote: 2011/10/6 Brendan Eich bren...@mozilla.com On Oct 5

Re: On I got 99 problems and JavaScript syntax ain't one

2011-10-10 Thread John J Barton
On Mon, Oct 10, 2011 at 3:09 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 10, 2011, at 1:41 PM, Bob Nystrom wrote: On Mon, Oct 10, 2011 at 1:33 PM, Dean Landolt d...@deanlandolt.comwrote: Here's an example: let tree = [['a', 'b', 'c'], [['d', 'e'], 'f'], ['g']]; let inOrder =

Re: Harmony transpilers

2011-10-11 Thread John J Barton
On Tue, Oct 11, 2011 at 6:41 AM, Juan Ignacio Dopazo dopazo.j...@gmail.comwrote: Hi! Is there anyone working on a Harmony transpiler besides Traceur? I'd like to understand why Traceur is not suitable. As far as I understand it was written to study new directions in JS. jjb It'd be really

Re: Harmony transpilers

2011-10-11 Thread John J Barton
On Tue, Oct 11, 2011 at 9:10 AM, Jake Verbaten rayn...@gmail.com wrote: One of the reasons traceur is not suitable is that it's a product of google and thus not neutral. Traceur is not a product, I think that is pretty obvious. It's just a JS to JS compiler written by some engineers very keen

Re: Harmony transpilers

2011-10-11 Thread John J Barton
On Tue, Oct 11, 2011 at 10:08 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 11, 2011, at 12:49 PM, John J Barton wrote: We don't know what the standard will be so we need some why to try out different features. That's not how the committee has worked since 2008, and even before

Re: Harmony transpilers

2011-10-11 Thread John J Barton
On Tue, Oct 11, 2011 at 11:14 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 11, 2011, at 1:47 PM, John J Barton wrote: On Tue, Oct 11, 2011 at 10:08 AM, Brendan Eich bren...@mozilla.comwrote: On Oct 11, 2011, at 12:49 PM, John J Barton wrote: We don't know what the standard

Re: JS tools (was: Harmony transpilers)

2011-10-11 Thread John J Barton
On Tue, Oct 11, 2011 at 1:10 PM, Axel Rauschmayer a...@rauschma.de wrote: *From: *Claus Reinke claus.rei...@talk21.com *Subject: **JS tools (was: Harmony transpilers)* *Date: *October 11, 2011 21:53:58 GMT+02:00 *To: *Brendan Eich bren...@mozilla.com *Cc: *es-discuss@mozilla.org There is

Re: Event properties on objects, a proxy experiment

2011-10-12 Thread John J Barton
On Wed, Oct 12, 2011 at 6:38 AM, David Bruant bruan...@gmail.com wrote: Hi, I have started a little experiment and I'd like to share it here. _Context_ We've been taught that objects are attributes and methods. Consequently, object clients can inspect attributes (though these are most

Re: Grawlix

2011-10-12 Thread John J Barton
On Wed, Oct 12, 2011 at 8:32 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 12, 2011, at 6:53 AM, Joe Developer wrote: I think an important question here is: Who are you actually trying to serve with your changes? See the actual goals requirements and goals for ES Harmony at

Re: Event properties on objects, a proxy experiment

2011-10-12 Thread John J Barton
On Wed, Oct 12, 2011 at 9:50 AM, Dean Landolt d...@deanlandolt.com wrote: On Wed, Oct 12, 2011 at 10:42 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 12, 2011 at 6:38 AM, David Bruant bruan...@gmail.com wrote: Rather than properties, how about modeling events

Re: On I got 99 problems and JavaScript syntax ain't one

2011-10-12 Thread John J Barton
On Wed, Oct 12, 2011 at 2:08 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 7, 2011, at 6:51 AM, Mikeal Rogers wrote: On Thu, Oct 6, 2011 at 5:08 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 4, 2011, at 10:52 AM, Mikeal Rogers wrote: But, some of them simply double the semantics

Re: Grawlix

2011-10-12 Thread John J Barton
On Wed, Oct 12, 2011 at 4:20 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote: ... +1. My narrow view is entirely formed by working on and talking to (the wide variety of) users of debuggers. jjb ___ es-discuss mailing list es-discuss@mozilla.org

Your search - | - did not match any documents

2011-10-12 Thread John J Barton
It's clear that if I am to follow any of Allen's posts I need to learn what | means. I looked through some of the email and the wiki, but I don't know what to look for really. I guess this is a binary operator, so we should be able to say operator something. Furthermore it seems like the concept

Re: array subclassing and class declarations

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 8:32 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: .. My understanding of | is that it sets the [[prototype]] property and nothing else. Consequently, I think that the semantics of Array | function(...){} is to create a function with the prototype chain as

Re: Your search - | - did not match any documents

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 10:29 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 13, 2011, at 1:17 PM, Brendan Eich wrote: ... Object.getPrototypeOf is the get API in ES5. For the preset API we want syntax at least, to avoid copying literals passed to a functional API. We could have the

Re: array subclassing and class declarations

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 11:16 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: This all arises from the language used in the ES specification. For the ES6 spec. I could, in theory, do a massive rename of [[Prototype]] to something else. However, I'm not sure whether such a renaming at this

Re: Your search - | - did not match any documents

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 11:51 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 13, 2011, at 2:19 PM, John J Barton wrote: On Thu, Oct 13, 2011 at 10:29 AM, Brendan Eich bren...@mozilla.comwrote: On Oct 13, 2011, at 1:17 PM, Brendan Eich wrote: ... Object.getPrototypeOf is the get API

Re: Your search - | - did not match any documents

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 12:59 PM, Dean Landolt d...@deanlandolt.com wrote: On Thu, Oct 13, 2011 at 3:13 PM, John J Barton johnjbar...@johnjbarton.com wrote: On Thu, Oct 13, 2011 at 11:51 AM, Brendan Eich bren...@mozilla.comwrote: On Oct 13, 2011, at 2:19 PM, John J Barton wrote

Re: Your search - | - did not match any documents

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 3:27 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 13, 2011, at 6:00 PM, John J Barton wrote: Simply stated, the triangle operator lets you set the prototype of an object if and only if that object has not yet been observably instantiated. It's a small tradeoff

Re: Your search - | - did not match any documents

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 4:26 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 13, 2011, at 3:55 PM, John J Barton wrote: Suppose for a moment we allowed objects on the RHS: var o3 = p | o2; Would we imagine that o2 was mutated in any way? I don't think so. Maybe

Re: Your search - | - did not match any documents

2011-10-13 Thread John J Barton
On Thu, Oct 13, 2011 at 6:08 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 13, 2011, at 5:08 PM, John J Barton wrote: On Thu, Oct 13, 2011 at 4:26 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: I still haven't found a really compelling use case for a non-literal | RHS

Re: Your search - | - did not match any documents

2011-10-14 Thread John J Barton
On Fri, Oct 14, 2011 at 12:56 AM, Jake Verbaten rayn...@gmail.com wrote: The difference is that object.extend returns objects where as object.make returns things with the same type as the second operand. So object.extend (obj, someFunction) is easy. where as object.make(obj, someFunction)

Re: JsDoc based type guards

2011-10-14 Thread John J Barton
On Fri, Oct 14, 2011 at 7:44 AM, Peter Dekkers pe...@jbaron.com wrote: Focus seems to be much on JsDoc, while I just meant it as an example. Didn't realize the sensitive nature of bringing up that documentation convention, sorry for that. I checked the strawman and it looks nice. However

Re: Your search - | - did not match any documents

2011-10-14 Thread John J Barton
On Fri, Oct 14, 2011 at 8:46 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 14, 2011, at 10:45 AM, John J Barton wrote: On Fri, Oct 14, 2011 at 12:56 AM, Jake Verbaten rayn...@gmail.com wrote: The difference is that object.extend returns objects where as object.make returns things

Re: Exemplar forms (was Your search - | - did not match any documents)

2011-10-14 Thread John J Barton
On Thu, Oct 13, 2011 at 4:14 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: Let me take a crack at tying to tie together all the pieces we have been talking about. Allen, I really appreciate your synthesis, thanks. I am able to follow some of it because of my recent Q/A with the group. I

Re: decoupling [ ] and property access for collections

2011-10-19 Thread John J Barton
On Wed, Oct 19, 2011 at 8:30 AM, Axel Rauschmayer a...@rauschma.de wrote: Then we can continue to use . and [] to access properties and use @[] to access data structure elements. I wouldn’t like the asymmetry introduced by using [] for the latter task. this is plausible and certainly a

Re: decoupling [ ] and property access for collections

2011-10-19 Thread John J Barton
On Wed, Oct 19, 2011 at 9:12 AM, Axel Rauschmayer a...@rauschma.de wrote: Thus, there really are two alternatives: 1. Changing [] in the above manner plus object@nameObject for accessing properties (as you suggested). 2. [] stays as it is and @[] (perhaps there is something slicker, e.g.

Re: decoupling [ ] and property access for collections

2011-10-19 Thread John J Barton
On Wed, Oct 19, 2011 at 9:52 AM, Axel Rauschmayer a...@rauschma.de wrote: What are you suggesting? A new primitive? Or a subtype of Object? I don’t think there is a third alternative to those two. I am suggesting that typeof return collection when the RHS defines a new semantic for []

Re: decoupling [ ] and property access for collections

2011-10-19 Thread John J Barton
On Wed, Oct 19, 2011 at 10:27 AM, Axel Rauschmayer a...@rauschma.de wrote: Problem: How do you invoke methods on table? table.tellAxel = function() {alert('here is a method call');}; table['tellAxel'] = function() {alert('here is a function entry);}; table.tellAxel(); // here is a method

Re: decoupling [ ] and property access for collections

2011-10-19 Thread John J Barton
On Wed, Oct 19, 2011 at 11:42 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: below On Oct 19, 2011, at 10:44 AM, John J Barton wrote: On Wed, Oct 19, 2011 at 10:27 AM, Axel Rauschmayer a...@rauschma.dewrote: Problem: How do you invoke methods on table? table.tellAxel = function

Re: yield and Promises

2011-10-21 Thread John J Barton
On Fri, Oct 21, 2011 at 9:41 AM, Brendan Eich bren...@mozilla.com wrote: On Oct 21, 2011, at 9:34 AM, John J Barton wrote: Can anyone summarize how these proposals relate to Kris Kowal / Kris Zyp / Mark Miller Q library: https://github.com/kriskowal/q Did you see https://github.com

Re: Protocol for new and instanceof?

2011-10-21 Thread John J Barton
On Fri, Oct 21, 2011 at 9:36 AM, Axel Rauschmayer a...@rauschma.de wrote: In a vein similar to making [] available to collections, one could make new and instanceof available to other inheritance schemes. For example: // “Meta-class” for prototypes as classes/instantiable prototypes

Re: yield and Promises

2011-10-21 Thread John J Barton
On Fri, Oct 21, 2011 at 10:46 AM, Mark S. Miller erig...@google.com wrote: On Fri, Oct 21, 2011 at 10:20 AM, John J Barton johnjbar...@johnjbarton.com wrote: In particular, Q simplifies joining parallel async operations (XHR, postMessages, 'load', 'progress' events). Of course it may well

Re: Terminology: types, constructors, classes, …

2011-10-23 Thread John J Barton
On Sun, Oct 23, 2011 at 11:11 AM, Axel Rauschmayer a...@rauschma.de wrote: - instanceof: use for objects. It's *usable* on objects, but not all that *useful*, even with natives like Array (they could have come from another frame). This is my biggest problem with javascript's nominative

Re: Terminology: types, constructors, classes, …

2011-10-23 Thread John J Barton
On Sun, Oct 23, 2011 at 11:24 AM, Axel Rauschmayer a...@rauschma.de wrote: - If instance factory B inherits from instance factory A, is B a subclass of A? B a subtype of A? B a subconstructor of A? B inherits A's prototype, A is in B's prototype chain B.prototype inherits A.protoype.

Re: More thoughts on Allen’s class definition pattern

2011-10-29 Thread John J Barton
On Sat, Oct 29, 2011 at 4:34 PM, Axel Rauschmayer a...@rauschma.de wrote: http://wiki.ecmascript.org/doku.php?id=harmony:object_extension_literal_class_pattern    const className = superClass | function(/*constructor parameters */) {        //constructor body        

Re: More thoughts on Allen’s class definition pattern

2011-10-30 Thread John J Barton
On Sat, Oct 29, 2011 at 10:31 PM, Rick Waldron waldron.r...@gmail.com wrote: On Oct 30, 2011, at 1:03 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Sat, Oct 29, 2011 at 4:34 PM, Axel Rauschmayer a...@rauschma.de wrote: http://wiki.ecmascript.org/doku.php?id

Re: More thoughts on Allen’s class definition pattern

2011-10-30 Thread John J Barton
On Sun, Oct 30, 2011 at 3:35 AM, Axel Rauschmayer a...@rauschma.de wrote: I guess every JS dev is puzzled by .prototype already. Compared to a class language, it seems like a hack. Do we really need it? I can't tell if this is sarcasm... Ive long held that prototypes are the next

Re: More thoughts on Allen’s class definition pattern

2011-10-31 Thread John J Barton
On Sun, Oct 30, 2011 at 12:33 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 29, 2011, at 10:03 PM, John J Barton wrote: ... JS is what it is. I don't think it is possible to make prototypes disappear without breaking many (most??) existing JS programs. (This perfectly

Re: More thoughts on Allen’s class definition pattern

2011-10-31 Thread John J Barton
On Sun, Oct 30, 2011 at 1:08 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 30, 2011, at 10:39 AM, John J Barton wrote: In the abstract I would agree, but, in our world, every college sophomore CS student learns a class based language and, in our world, prototypical inheritance

  1   2   3   >