Array extras functionality for iterators

2012-02-04 Thread Domenic Denicola
ES5's existing array extras make working with arrays a joy. However, sometimes arrays are not the right tool for the job. Perhaps you want lazy evaluation semantics (generators). Or perhaps you want to communicate that the list is immutable (compare .NET's `IEnumerableT` or Java's

RE: Array extras functionality for iterators

2012-02-04 Thread Domenic Denicola
, Domenic Denicola dome...@domenicdenicola.com wrote: ES5's existing array extras make working with arrays a joy. However, sometimes arrays are not the right tool for the job. Perhaps you want lazy evaluation semantics (generators). Or perhaps you want to communicate that the list is immutable

RE: Array extras functionality for iterators

2012-02-04 Thread Domenic Denicola
someVeryLargeArray.iMap(someFunction); // Lazy, guaranteed only to be iterable How about `someVeryLargeArray.asIterator().map(someFunction)`? -Domenic ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

RE: lexical for-in/for-of loose end

2012-02-07 Thread Domenic Denicola
This seems like a highly compelling argument. I hope I'm not the only one who thinks the existing behavior of `for(;;)` makes sense. Granted, that comes from understanding the detail that closures close over variables and not values, which most users will not. But in general, `for(;;)` makes it

RE: __proto__ security

2012-02-10 Thread Domenic Denicola
I am generally with Brendan that specifying __proto__ is not very necessary. But, one thing I would like enshrined in the spec is that `__proto__ in Object.create(null) === false`. ___ es-discuss mailing list es-discuss@mozilla.org

RE: Set iterators

2012-02-13 Thread Domenic Denicola
As a starting point, would it make sense to provide an API that matches Array.prototype methods (where applicable)? I think this ties in to my earlier desire to make Array.prototype methods work with iterators in general [1]. That is, I think the correct way to do this would be: 1) To

RE: Array.prototype.contains

2012-02-23 Thread Domenic Denicola
Perhaps using indexOfIdentical from http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Erik Arvidsson [erik.arvids...@gmail.com] Sent: Thursday, February

RE: set.delete method name

2012-02-28 Thread Domenic Denicola
I appreciate the feedback, but I do not understand the rationale. The rationale I found compelling from upthread was that remove is a more apt antonym to add. To compare, delete's natural counterpart would be put. ___ es-discuss mailing list

RE: Typeof this in getters (was: eval on non-strings)

2012-02-28 Thread Domenic Denicola
: Tuesday, February 28, 2012 14:38 To: Domenic Denicola Cc: Allen Wirfs-Brock; Brendan Eich; es-discuss@mozilla.org Subject: Re: Typeof this in getters (was: eval on non-strings) I like the output display on http://jsfiddle.net/CxdMs/16/ a bit better. I just tried it on very recent versions of 4

RE: Typeof this in getters (was: eval on non-strings)

2012-02-28 Thread Domenic Denicola
To clarify, the expected results here are: Non-strict Typeof this inside a function when called on a number: object Typeof this inside an Object.prototype getter when used on a number: object Strict Typeof this inside a function when called on a number: number Typeof this inside an

RE: How about replacing | with -

2012-03-03 Thread Domenic Denicola
If we’re taking votes: -1. I would actively avoid using this in my own ES6 code, because of the unnecessary confusion it would cause to those coming from CoffeeScript. From: Carlos Prado García Sent: Saturday, March 03, 2012 17:58:38 To: es-discuss Subject: Re: How about replacing | with - +1

RE: optional function keyword

2012-03-06 Thread Domenic Denicola
This wins on so many levels: * Short but C-like myList.map((x) x*x) syntax for the most common cases, where TCP doesn't matter. * Full TCP support via an entirely new, but still pretty C-like, syntax with myList.map((x) do { … }). * The two are sufficiently close to each other and to the

RE: Using Object Literals as Classes

2012-03-16 Thread Domenic Denicola
Just to contribute to this... er... fun-thread... My team uses the closure pattern for our classes (i.e. no prototype methods at all), since we value encapsulation. I can't imagine we're alone. So any class solution that doesn't fully incorporate private names (e.g. by making them awkward via

RE: usable enough private names (was: Re: Using Object Literals as Classes)

2012-03-16 Thread Domenic Denicola
, March 16, 2012 17:20 To: Domenic Denicola Cc: Russell Leggett; Kevin Smith; es-discuss Subject: usable enough private names (was: Re: Using Object Literals as Classes) Domenic Denicola wrote: Just to contribute to this... er... fun-thread... My team uses the closure pattern for our classes (i.e

Re: Using Object Literals as Classes

2012-03-16 Thread Domenic Denicola
On Mar 16, 2012, at 18:05, David Bruant bruan...@gmail.commailto:bruan...@gmail.com wrote: Le 16/03/2012 23:00, Rick Waldron a écrit : On Fri, Mar 16, 2012 at 5:12 PM, Domenic Denicola dome...@domenicdenicola.commailto:dome...@domenicdenicola.com wrote: Just to contribute to this... er... fun

Re: Using Object Literals as Classes

2012-03-16 Thread Domenic Denicola
On Mar 16, 2012, at 18:12, Rick Waldron waldron.r...@gmail.commailto:waldron.r...@gmail.com wrote: On Fri, Mar 16, 2012 at 6:04 PM, David Bruant bruan...@gmail.commailto:bruan...@gmail.com wrote: Le 16/03/2012 23:00, Rick Waldron a écrit : On Fri, Mar 16, 2012 at 5:12 PM, Domenic Denicola

RE: Using Object Literals as Classes

2012-03-16 Thread Domenic Denicola
From: Rick Waldron [mailto:waldron.r...@gmail.com] Sent: Friday, March 16, 2012 18:40 To: Domenic Denicola Cc: David Bruant; es-discuss Subject: Re: Using Object Literals as Classes On Fri, Mar 16, 2012 at 6:20 PM, Domenic Denicola dome...@domenicdenicola.commailto:dome...@domenicdenicola.com

RE: Using Object Literals as Classes

2012-03-16 Thread Domenic Denicola
From: Axel Rauschmayer [mailto:a...@rauschma.de] Sent: Friday, March 16, 2012 18:35 To: Domenic Denicola Cc: Russell Leggett; Kevin Smith; es-discuss Subject: Re: Using Object Literals as Classes Just to contribute to this... er... fun-thread... My team uses the closure pattern for our classes

RE: Using Object Literals as Classes

2012-03-16 Thread Domenic Denicola
From: Rick Waldron [mailto:waldron.r...@gmail.com] Sent: Friday, March 16, 2012 19:28 To: Domenic Denicola Cc: David Bruant; es-discuss Subject: Re: Using Object Literals as Classes On Mar 16, 2012, at 7:11 PM, Domenic Denicola dome...@domenicdenicola.commailto:dome...@domenicdenicola.com wrote

RE: simpler, sweeter syntax for modules

2012-03-22 Thread Domenic Denicola
Callable modules are a hugely important use case. jQuery and Underscore spring to mind. I’ve made one myself [1]. Also important: what about construct-able modules? Or to put it another way, what about exporting a module that is a class? Examples from Node [2] [3] and Node-land [4] [5] are

Re: RegExps in array functions

2012-03-23 Thread Domenic Denicola
Does passing /foo/i.test not work? (Away from computer.) Perhaps it should, if it doesn't? On Mar 23, 2012, at 16:28, Felix Böhm esdisc...@feedic.commailto:esdisc...@feedic.com wrote: Hi guys, just a first try for a proposal: Array.prototype.[filter/some/every] currently require a function

Re: RegExps in array functions

2012-03-23 Thread Domenic Denicola
...@gmail.commailto:russell.legg...@gmail.com wrote: On Mar 23, 2012, at 9:05 PM, John Tamplin j...@google.commailto:j...@google.com wrote: On Fri, Mar 23, 2012 at 8:21 PM, Domenic Denicola dome...@domenicdenicola.commailto:dome...@domenicdenicola.com wrote: Does passing /foo/i.test not work? (Away from

Re: Finding a safety syntax for classes

2012-03-27 Thread Domenic Denicola
On Mar 27, 2012, at 13:10, David Herman dher...@mozilla.com wrote: I recognize the C.prototype.constructor idiom already exists, but it's a weak idiom. I'm not crazy about the idea of strengthening a problematic but currently unreliable and rarely used idiom. Dave Speaking as a dev, I

RE: March 28 meeting notes

2012-03-29 Thread Domenic Denicola
Great to gain consensus indeed. This looks just about as nice as it can be. Minor question: There are no examples of very empty arrow functions, e.g. `=` or `= 5`. And from what I can tell reading the grammar , they are not allowed. Is this necessary? CoffeeScript's allowance of `- (expr)`

RE: Do Maximally Minimal classes carry their weight?

2012-03-31 Thread Domenic Denicola
As a quick follow-up: Perhaps adding non-arcane-incantation private name declarations would be enough to push maximally-minimal classes from “nice, but are they worth it?” to “this gives us something we can’t get anywhere else.” To wit: class Set extends Collection { private setContents,

Re: Extra functions on Arrays, Maps, etc..

2012-04-07 Thread Domenic Denicola
On Apr 7, 2012, at 20:37, Rick Waldron waldron.r...@gmail.commailto:waldron.r...@gmail.com wrote: On Sat, Apr 7, 2012 at 8:31 PM, Erik Arvidsson erik.arvids...@gmail.commailto:erik.arvids...@gmail.com wrote: On Sat, Apr 7, 2012 at 17:28, Rick Waldron

RE: Terminology: “non-method function”

2012-04-11 Thread Domenic Denicola
We use `Function.prototype.partial` in our codebase. We consider `Function.prototype.papply` but thought that would be too confusing with `Function.prototype.apply`. From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Axel

RE: Fun impossible Firefox JS challenge

2012-04-12 Thread Domenic Denicola
The real question is, are there test-262's for this behavior? Or for the original nonconforming `function true() { }`? From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Mathias Bynens [math...@qiwi.be] Sent: Thursday,

RE: Fun impossible Firefox JS challenge

2012-04-12 Thread Domenic Denicola
var tru\u0065; = Expected identifier error in IE9. console.log(fals\u0065) = Syntax error in IE9. Can test IE10 when I get home from work. From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Brendan Eich

RE: Fun impossible Firefox JS challenge

2012-04-12 Thread Domenic Denicola
-boun...@mozilla.org] On Behalf Of Domenic Denicola Sent: Thursday, April 12, 2012 13:49 To: Brendan Eich; Allen Wirfs-Brock Cc: es-discuss Steen Subject: RE: Fun impossible Firefox JS challenge var tru\u0065; = Expected identifier error in IE9. console.log(fals\u0065) = Syntax error in IE9. Can

RE: undefined being treated as a missing optional argument

2012-04-13 Thread Domenic Denicola
I'm sympathetic toward `undefined` as a sentinel for no value of the expected type, whereas `null` means we have a value of the expected type, but that value represents 'nothing.' Not sure if anyone else sees it that way, though, and admittedly it's based on vague hand-wavey arguments.

RE: try without catch or finally

2012-04-17 Thread Domenic Denicola
Tangentially related: https://github.com/kriskowal/q/wiki/On-Exceptions From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Nebojša Ćirić [c...@google.com] Sent: Tuesday, April 17, 2012 16:39 To: Jussi Kalliokoski Cc: es-discuss

RE: callable objects ?

2012-04-17 Thread Domenic Denicola
It seems rather non-intention-revealing. From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Mark S. Miller [erig...@google.com] Sent: Tuesday, April 17, 2012 17:20 To: Brendan Eich Cc: Tom Van Cutsem; Mark Miller; es-discuss

RE: A few arrow function specification issues

2012-04-21 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss- boun...@mozilla.org] On Behalf Of Angus Croll Sent: Saturday, April 21, 2012 16:03 To: Allen Wirfs-Brock Cc: es-discuss Subject: Re: A few arrow function specification issues 4) Should it be a dynamic

Re: caller poison pills, revisited (Was: A few arrow function specification issues)

2012-04-23 Thread Domenic Denicola
I'm becoming increasing convinced that the poison pill approach to securing the caller chain is a poor approach. We keep finding leaks in and it does nothing to prevent implementation from inventing new ways to expose the stating they are trying to hide. I now think we would be better off

RE: A few arrow function specification issues

2012-04-23 Thread Domenic Denicola
As a day-to-day user who was not using strict until recently (stubborn other team member for the loss), I can say that moving to strict was much more a cleanup experience than a mode experience, with only a few small exceptions: 1) Poison-pilling arguments.callee: some code on the internet

Re-throwing errors

2012-05-11 Thread Domenic Denicola
Consider: try { doStuff(); } catch (e) { console.log(uh oh, got an e, e); throw e; } In Node and in all browsers I've tested with, this currently loses the stack trace for `e`, and more importantly loses debugger step-back-ability in tools like Firebug and Web Inspector. One

RE: Re-throwing errors

2012-05-11 Thread Domenic Denicola
smaller problem. From: Rick Waldron [waldron.r...@gmail.com] Sent: Friday, May 11, 2012 16:10 To: Brendan Eich Cc: Domenic Denicola; es-discuss@mozilla.org Subject: Re: Re-throwing errors On Fri, May 11, 2012 at 2:43 PM, Brendan Eich bren

ToNumber(0b1001)

2012-05-21 Thread Domenic Denicola
I was going over the latest draft and noticed that, while binary and octal literals have been introduced in 7.8.3, they weren’t added to 9.1.3.1 (“ToNumber applied to the String type”). Should they be? Pros: symmetry. Cons: breaks backward compatibility (currently ToNumber(0b1001) returns

RE: minutes, TC39 meeting Tues 5/22/2012

2012-05-23 Thread Domenic Denicola
The prototyping efforts are appreciated, but can rarely be used in a comfortable way. (Compared to, say, HTML5.) I've thought a lot about how to feasibly use Harmony features in real-world code, but have fallen down every time. Here are some of the stumbling blocks I've encountered: * Node.js

RE: minutes, TC39 meeting Tues 5/22/2012

2012-05-23 Thread Domenic Denicola
You are of course right, Brendan, and thanks for addressing my points. Certainly part of this was fueled more by frustration than informed knowledge (see below). -Original Message- From: Brendan Eich [mailto:bren...@mozilla.com] The prototyping efforts are appreciated, but can

RE: minutes, TC39 meeting Tues 5/22/2012

2012-05-23 Thread Domenic Denicola
From: Rick Waldron [mailto:waldron.r...@gmail.com] Etc. It's ES6-like, but doesn't reflect TC39's actual progress, instead reflecting the Traceur team's interpretation of where TC39 might eventually, hopefully, end up. I don't think this is a fair claim to make, considering Traceur had

RE: Subclassing built-in constructors

2012-05-26 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss- boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Saturday, May 26, 2012 15:08 New syntax may some day clean all this up but the short path wins and it'll be hard to displace. Let's be realistic. I agree

RE: arrows and a proposed softCall

2012-05-31 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss- boun...@mozilla.org] On Behalf Of Mark S. Miller Sent: Thursday, May 31, 2012 22:24 Non-strict mode is so bizzarre that I wouldn't be surprised, but I can't think of an example. Is my proposed rule unsound

RE: super, methods, constructors Co.

2012-06-01 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss- boun...@mozilla.org] On Behalf Of Allen Wirfs-Brock Sent: Friday, June 01, 2012 04:05 We haven't eliminated the ability to define object literals that inherit from objects other than Object.prototype. We

RE: Error stack

2012-06-07 Thread Domenic Denicola
Machine-parsability might be reaching too far, especially if you lose the benefits of nice function/method name inference. Instead, perhaps a separate strawman to standardize something like the V8 stack trace API [1]? It is used in Node for providing long stack traces [2], [3], [4]. It's a bit

Re: Default operator strawman - ||| rather than ??

2012-06-14 Thread Domenic Denicola
In our experience writing large apps, the distinction is useful. Undefined means I forgot to do something (e.g. set a property or pass an argument); null means I tried to get something but it didn't exist. Very roughly, it becomes undefined = caller error outside of my control, null = my error

Re: Default operator strawman - ||| rather than ??

2012-06-14 Thread Domenic Denicola
On Jun 14, 2012, at 14:03, Rick Waldron waldron.r...@gmail.commailto:waldron.r...@gmail.com wrote: On Thu, Jun 14, 2012 at 11:58 AM, Domenic Denicola dome...@domenicdenicola.commailto:dome...@domenicdenicola.com wrote: In our experience writing large apps, the distinction is useful. Undefined

RE: Existential operator (was: ||= is much needed?)

2012-06-19 Thread Domenic Denicola
What struck me from Jeremy's explanation was the uniformity of CoffeeScript's ? operator (modulo the small issue he mentioned for function calls). It seems to combine the currently-strawman'ed ??/??= and ?. into one very simple semantic. What about adopting ?? as CoffeeScript's ? operator?

Re: Existential operator (was: ||= is much needed?)

2012-06-21 Thread Domenic Denicola
On Jun 21, 2012, at 3:22, Herby Vojčík he...@mailbox.sk wrote: Brendan Eich wrote: Herby Vojčík wrote: I feel there is objection to introduce magical [[NullPatternObject]] into language, but all of CS-style soft-accesses could be solved very cleanly and consistently. No, because (a)

RE: The Name of the Name

2012-08-01 Thread Domenic Denicola
Why is there concern about uniqueness at all? Won’t this be inside a module? import Symbol from @symbols From: François REMY Sent: Wednesday, August 1, 2012 17:07:02 To: Rick Waldron, Mark S. Miller CC: es-discuss Subject: RE: The Name of the Name Symbol could already be used by parsers and

RE: var declarations shadowing properties from Window.prototype

2012-08-12 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Saturday, August 11, 2012 22:57 As noted, they started out that way 17 years ago. I think WebIDL and interface-based method definition made onload, e.g.,

Re: About Array.of()

2012-08-27 Thread Domenic Denicola
Array.fromElements is solid, especially considering how rarely this will be used, especially given that it competes in ES6 code with `...x = [...x]` On Aug 27, 2012, at 23:42, 程劭非 csf...@gmail.com wrote: Yes, as a developer (but not English native speaker), I really feel uncomfortable with

RE: i18n API - resolvedOptions

2012-08-31 Thread Domenic Denicola
For comparison, quite a lot of ECMAScript function names are nouns, e.g. Date.now, String.prototype.{substring, indexOf}, etc. From: Norbert Lindenberg Sent: ‎August‎ ‎31‎, ‎2012 ‎12‎:‎16 To: Marcos Caceres CC: es-discuss Subject: Re: i18n API - resolvedOptions Actually, all options have to be

Re: Generator issue: exceptions while initializing arguments

2012-09-11 Thread Domenic Denicola
On Sep 11, 2012, at 4:39, Brendan Eich bren...@mozilla.com wrote: Brendan Eich wrote: Dmitry Soshnikov wrote: var FOO = 42; function bar(x, y = FOO + z) { var z = 10; } // Error .. ? Translating to JS as it is: var FOO = 42; function bar(x, y) { if (y === void 0) y = FOO + z;

Re: Performance concern with let/const

2012-09-17 Thread Domenic Denicola
2. The stated goal of 'let' is to replace 'var' in common usage (and if this is not the goal, we should not be adding 'let'). There is actually some disagreement about that statement of the goal. The goal of let is to provide variable that are scoped to the block level. That is the

Re: Early error vs. error on first call to function vs. runtime error

2012-09-27 Thread Domenic Denicola
As a user, not implementer, I really want early errors. Perf costs of startup are negligible especially long-term. By the time ES6 is in browsers computers and phones should be faster by enough of a factor to mitigate any costs, whereas omitting early errors hurts developers indefinitely into

Re: Early error vs. error on first call to function vs. runtime error

2012-09-28 Thread Domenic Denicola
On Sep 28, 2012, at 20:58, Brendan Eich bren...@mozilla.org wrote: John Lenz wrote: The best thing I see for the future is if the Browser vendors didn't reparse JavaScript when loading from cache, this would help the best case scenarios, but doesn't help the worse case where it harder to

RE: typeof symbol (Was: Sept 19 TC39 Meeting Notes)

2012-10-01 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of David Bruant [bruan...@gmail.com] Sent: Monday, October 01, 2012 16:23 To: Brendan Eich Cc: es-discuss Subject: Re: typeof symbol (Was: Sept 19 TC39 Meeting Notes) Try typeof

Re: Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is Object?)

2012-10-01 Thread Domenic Denicola
On Oct 1, 2012, at 18:58, Brendan Eich bren...@mozilla.org wrote: I am warming up to the way CoffeeScript does things -- not the translation scheme, __extends, __super__ -- rather, the plain Object instance created as C.prototype that has B.prototype as its [[Prototype]] but has shadowing

RE: Suggestions for Set

2012-10-01 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Monday, October 1, 2012 21:43 To: Nicholas C. Zakas I would really like to see a *Set.prototype.toArray* method to easily change the Set back into an

RE: Suggestions for Set

2012-10-02 Thread Domenic Denicola
From: Rick Waldron [waldron.r...@gmail.com] Sent: Tuesday, October 02, 2012 16:52 No iteration for spread, per July 24 resolution https://mail.mozilla.org/pipermail/es-discuss/2012-July/024207.html Oh, thanks for catching me on that. Silly Firefox... This seems like an unfortunate decision,

RE: Suggestions for Set

2012-10-02 Thread Domenic Denicola
From: Rick Waldron [mailto:waldron.r...@gmail.com] Sent: Tuesday, October 2, 2012 17:18 On Tue, Oct 2, 2012 at 5:11 PM, Domenic Denicola dome...@domenicdenicola.com wrote: From: Rick Waldron [waldron.r...@gmail.com] Sent: Tuesday, October 02, 2012 16:52 No iteration for spread, per

Re: Symbols, Protocols, Frames, and Versioning

2012-10-03 Thread Domenic Denicola
Would it suffice to allow cross-frame sharing of symbols via postMessage and its structured clone algorithm? They're immutable, right? On Oct 3, 2012, at 15:01, Brendan Eich bren...@mozilla.org wrote: Thanks for pointing this out. Python's dunder-prefixing or anything like it in JS has that

RE: Symbols, Protocols, Frames, and Versioning

2012-10-05 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Andreas Rossberg Sent: Friday, October 5, 2012 14:46 On 5 October 2012 14:26, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Fri, Oct 5, 2012 at 8:21 AM, Kevin Smith

RE: Function.length and Default Parameters

2012-10-12 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Kevin Smith [khs4...@gmail.com] Sent: Friday, October 12, 2012 12:30 Again: function f(a = 1, b, c) {} f.length === 0; // Huh? You seem to be under the mistaken impression that ES6 allows non-defaulted

Re: Function.length and Default Parameters

2012-10-12 Thread Domenic Denicola
On Oct 12, 2012, at 13:03, Kevin Smith khs4...@gmail.commailto:khs4...@gmail.com wrote: You seem to be under the mistaken impression that ES6 allows non-defaulted arguments after default ones. This is not the case. See https://mail.mozilla.org/pipermail/es-discuss/2012-October/025704.html

Request for feedback on a talk on I'm giving on ES6

2012-10-21 Thread Domenic Denicola
(Attempting to send again with fewer URLs to avoid being spam-filtered? Apologies if this shows up twice.) On Monday I'll be giving a talk about ES6 at EmpireJS. I just finished up my slides, and would love some feedback and critique from the es-discuss crew:

RE: Request for feedback on a talk on I'm giving on ES6

2012-10-21 Thread Domenic Denicola
Thanks so much for the feedback! -Original Message- From: Brendan Eich [mailto:bren...@mozilla.org] Sent: Sunday, October 21, 2012 14:17 Slide 15 has a comment at the bottom: // error! used a `let` before declaration but this error is about the most-indented log call, the one in

RE: Request for feedback on a talk on I'm giving on ES6

2012-10-21 Thread Domenic Denicola
Thanks for your help Rick! I've corrected a few, but wasn't sure about some others. Let me know if I'm missing something in the following: From: Rick Waldron [mailto:waldron.r...@gmail.com] Sent: Sunday, October 21, 2012 17:07 nit: The comment itself says // error! used a `let` before

RE: Request for feedback on a talk on I'm giving on ES6

2012-10-22 Thread Domenic Denicola
Of Domenic Denicola Sent: Sunday, October 21, 2012 13:46 To: 'es-discuss@mozilla.org' Subject: Request for feedback on a talk on I'm giving on ES6 (Attempting to send again with fewer URLs to avoid being spam-filtered? Apologies if this shows up twice.) On Monday I'll be giving a talk about

Re: Map.prototype.clear method

2012-10-22 Thread Domenic Denicola
On Oct 22, 2012, at 14:28, Yehuda Katz wyc...@gmail.commailto:wyc...@gmail.com wrote: On Mon, Oct 22, 2012 at 11:11 AM, Axel Rauschmayer a...@rauschma.demailto:a...@rauschma.de wrote: What about copying of these new data structures? It should be possible to initialize a collection via another

Re: `free` operator

2012-10-25 Thread Domenic Denicola
I do think that including this as a debugging tool is where the most value is. Whether through an engine-provided API (like V8's gc()/--expose-gc) or through something more standardized, like the existing `debugger` statement, is the real question. On Oct 25, 2012, at 21:04, Alex Russell

Re: `free` operator

2012-10-25 Thread Domenic Denicola
On Oct 25, 2012, at 23:13, Andrew Paprocki and...@ishiboo.com wrote: On Thu, Oct 25, 2012 at 10:14 PM, Shawn Steele shawn.ste...@microsoft.com wrote: On the contrary, TypeError: Cannot read property 'prop' of undefined, with a stack trace, is WAY easier to track down than The RSS on my

RE: Array.prototype.contains

2012-11-02 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Erik Arvidsson Sent: Friday, November 2, 2012 13:21 If we call it has, should we also rename String.prototype.contains? I'd say no; the distinction between collections having an

RE: Promises

2012-11-06 Thread Domenic Denicola
I guess now is a good a time as any to pre-announce Promises/A+: https://github.com/promises-aplus/promises-spec It’s an attempt to improve significantly on the minimal-but-perhaps-too-minimal Promises/A of CommonJS, making the language more rigorous and speccing several important things

RE: Promises

2012-11-06 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Mikeal Rogers [mikeal.rog...@gmail.com] Sent: Tuesday, November 06, 2012 15:33 also, node.js won't adopt either a promise API or a promise syntax for it's core API. if it lands in the language then nothing is

RE: Promises

2012-11-06 Thread Domenic Denicola
As an interesting aside, I just wanted to highlight the section of Promises/A+ that Rick was referring to, because I think it uses a rather clever trick to avoid discussing the event loop while still requiring the behavior we want: onFulfilled and onRejected must not be called before then

RE: Promises

2012-11-06 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Axel Rauschmayer Sent: Tuesday, November 6, 2012 19:07 Different issue: do we already have a solution for a missing error handler causing silent failures? task.js should cover

RE: Promises

2012-11-07 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Kevin Smith Sent: Wednesday, November 7, 2012 09:58 The only hard part that isn't really addressed by currently library implementations is error handling.  I feel pretty strongly that rejections (and

RE: Promises

2012-11-09 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Mark S. Miller Sent: Friday, November 9, 2012 08:33 Hi David, thanks for your thoughtful post. I've always used the two-arg form of .then[1], but your post makes a strong case for more often using

then

2012-11-09 Thread Domenic Denicola
The recent promise discussion prompted me to recall the following musing/proposal from Kris Kowal: https://github.com/kriskowal/q/wiki/On-Exceptions In short, there's a common code pattern that you can do with promises that you can't do with synchronous code. The proposal is for a language

RE: then

2012-11-09 Thread Domenic Denicola
The idea is to not do the processing if the JSON parsing fails. From: Cryptic Swarm [mailto:crypticsw...@gmail.com] Sent: Friday, November 9, 2012 11:55 To: Domenic Denicola Cc: es-discuss@mozilla.org Subject: Re: then The following should work? Finally expects a block statement, so need to wrap

RE: Promises

2012-11-14 Thread Domenic Denicola
Why go purposefully against the existing terminology of the JavaScript ecosystem? Just say “deferred” where you have “promise” and “promise” where you have “future” and you avoid needless confusion and conflict. This isn’t Scala; we have existing terminology for exactly these concepts. Just

RE: Promises

2012-11-14 Thread Domenic Denicola
From: Kevin Smith [khs4...@gmail.com] Sent: Wednesday, November 14, 2012 11:41 Why go purposefully against the existing terminology of the JavaScript ecosystem? Just say “deferred” where you have “promise” and “promise” where you have “future” and you avoid needless confusion and conflict.

RE: let and strict mode

2012-11-17 Thread Domenic Denicola
Personally, the fact that modules opt in to strict mode completely obviates the problem for me. I anticipate this to be the case for most non-beginner ES programmers as well, since they are largely using either a CommonJS-like or an AMD module system, and as part of an ES6 migration would then

RE: Subclassing basic types in DOM - best method?

2012-11-20 Thread Domenic Denicola
For URLQuery in particular, since it's a String-String map, why not just use a plain-old-JavaScript-object with appropriate interceptions via a proxy? This provides a much more idiomatic API: new URLQuery(object) stays the same urlQuery.get(name) - urlQuery[name][0] urlQuery.getAll(name) -

RE: Default value argument for Map/WeakMap.prototype.get()

2012-11-28 Thread Domenic Denicola
Using https://github.com/substack/defined you can do var d = require(defined); var x = d(m.get(key), defaultValue); Not sure if this is an argument for adding default value because this module is so ridiculous ... or against it since it’s so trivial to get the functionality yourself. From:

RE: Proposal: Reflecting on non-string property names

2012-12-02 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Allen Wirfs-Brock Sent: Friday, November 30, 2012 19:18 1) Object.getOwnPropertyNames and Object.keys remain unchanged. They only return a string property key values. 2)

RE: (Map|Set|WeakMap)#set() returns `this` ?

2012-12-03 Thread Domenic Denicola
+1 (to all sentiments in the message :) From: Nathan Wallmailto:nathan.w...@live.com Sent: ‎12/‎3/‎2012 17:53 To: Andrea Giammarchimailto:andrea.giammar...@gmail.com; Rick Waldronmailto:waldron.r...@gmail.com Cc: es-discuss@mozilla.orgmailto:es-discuss@mozilla.org

RE: On dropping @names

2012-12-03 Thread Domenic Denicola
On the subject of ugly code, I believe the killing of @names and the reintroduction of computed properties means that the typical iterator form will be something like: let iterable = { *[iterator]() { yield 5; } }; Presented without comment... From: Brandon

RE: (Map|Set|WeakMap)#set() returns `this` ?

2012-12-05 Thread Domenic Denicola
Readability or library preference aside, I still think it's bizarre that map.set(key, val) is analogous to (dict[key] = val, dict) and not to dict[key] = val When I'm using a fluent library like jQuery or a configuration DSL like those in the npm packages surveyed, I can see the attraction

RE: Module Comments

2012-12-06 Thread Domenic Denicola
For the record, here's the idea Yehuda and I worked out: https://gist.github.com/1ab3f0daa7b37859ce43 I would *really* appreciate if people read it (it's easy reading, I promise!) and incorporated some of our concerns and ideas into their thinking on module syntax. In general, it tries to

RE: Module Comments

2012-12-08 Thread Domenic Denicola
-Original Message- From: Andreas Rossberg [mailto:rossb...@google.com] Sent: Thursday, December 6, 2012 11:31 On 6 December 2012 16:44, Domenic Denicola dome...@domenicdenicola.com wrote: For the record, here's the idea Yehuda and I worked out: https://gist.github.com

RE: Number.isNaN

2012-12-14 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Nathan Wall [nathan.w...@live.com] Sent: Friday, December 14, 2012 13:34 On another note, I do sort of wonder why `Number.isNaN` is coming into the language now at the same time as the `is` operator and

RE: Reflection of global bindings

2012-12-15 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Saturday, December 15, 2012 14:26 Reflecting var and function bindings on window (or |this| or |self| or other aliases) as configurable properties, but refusing to allow

RE: URLs / subclassing JavaScript

2012-12-17 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Anne van Kesteren [ann...@annevk.nl] Sent: Monday, December 17, 2012 09:56 By types I mean e.g. constraining set() to just accept strings. I think the JavaScript-y way of doing this, as exemplified in the ES5

RE: Do Anonymous Exports Solve the Backwards Compatibility Problem?

2012-12-19 Thread Domenic Denicola
-Original Message- From: es-discuss-boun...@mozilla.org [mailto:es-discuss- boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Wednesday, December 19, 2012 23:11 In a thread you may not have caught up on, Andreas did argue for a special form such as module foo at foo; for

Re: Do Anonymous Exports Solve the Backwards Compatibility Problem?

2012-12-20 Thread Domenic Denicola
On Dec 20, 2012, at 19:02, David Herman dher...@mozilla.com wrote: On Dec 20, 2012, at 1:29 PM, Brendan Eich bren...@mozilla.com wrote: So the particular approach -- in particular -- that you are questioning is adding export = to ES6 modules. I agree it is ad-hoc. It also seems likely to

RE: On dropping @names

2012-12-26 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of David Herman Sent: Wednesday, December 26, 2012 19:50 I imagine your reply is: don't do that transformation; place your `let` declarations as late as possible before they are going to be used. I

  1   2   3   4   5   6   7   >