Re: How can GetModuleNamespace throw a SyntaxError?

2015-12-11 Thread André Bargull
> Jon: yes, it might be a redundant error, I will investigate more. > > /caridy Module Records other than Source Text Module Records could return `null` when calling ResolveExport() in GetModuleNamespace(). The specification of the abstract ResolveExport() method does not forbid this case.

Re: Assignment of global variables deleted by their RHS in strict mode

2015-08-27 Thread André Bargull
A fix for this would be in 8.1.1.4.5, insert between the current steps 4 and 5: 4.5 If S is true, then a. Let stillHasBinding be ObjRec.HasBinding(N). b. ReturnIfAbrupt(stillHasBinding). c. If stillHasBinding is false, throw a ReferenceError exception. I

Re: let function

2015-05-14 Thread André Bargull
On May 14, 2015, at 12:40 PM, Alexander Jones wrote: Ah, thanks for explaining! What about the Temporal Dead Zone of let, or const binding semantics, for those of us who are obsessive enough to desire that kind of thing everywhere? ES6 specifies that function declarations are allowed in

Re: What is `this` inside a new-invoked generator?

2015-03-23 Thread André Bargull
Question: what does the following code snippet log in the last line? ```js function* gen() { yield this; } let genObj = new gen(); let [_this] = genObj; console.log(_this === genObj); // ??? ``` I’m finding three answers: 1. The spec says [1] that any reference to `this` in a generator

Re: Module import/export bindings

2015-03-15 Thread André Bargull
From my current understanding (based on other threads), this module: ```js var foo = 42; export default foo; export foo; foo = 10; I guess you'd intended to write `export {foo as default}` instead of `export default foo`, because the latter exports the value of the expression when it gets

Re: Q: Lonely surrogates and unicode regexps

2015-01-28 Thread André Bargull
On 1/28/2015 2:51 PM, André Bargull wrote: For a reference, here's how Java (tried w/ Oracle 1.8.0_31 and openjdk 1.7.0_65) Pattern.UNICODE_CHARACTER_CLASS works: foo\uD834bar and foo\uDC00bar match ^foo[^a]bar$ and ^foo.bar$, so, generally, lonely surrogates match /./. Backreferences

Re: Q: Lonely surrogates and unicode regexps

2015-01-28 Thread André Bargull
For a reference, here's how Java (tried w/ Oracle 1.8.0_31 and openjdk 1.7.0_65) Pattern.UNICODE_CHARACTER_CLASS works: foo\uD834bar and foo\uDC00bar match ^foo[^a]bar$ and ^foo.bar$, so, generally, lonely surrogates match /./. Backreferences are allowed to consume the leading surrogate of a

Re: Q: Lonely surrogates and unicode regexps

2015-01-28 Thread André Bargull
On Wed, Jan 28, 2015 at 11:36 AM, Marja Hölttä marja at chromium.org https://mail.mozilla.org/listinfo/es-discuss wrote: / The ES6 unicode regexp spec is not very clear regarding what should happen // if the regexp or the matched string contains lonely surrogates (a lead // surrogate

Re: Q: Lonely surrogates and unicode regexps

2015-01-28 Thread André Bargull
); --- On Wed, Jan 28, 2015 at 3:11 PM, André Bargull andre.barg...@udo.edu mailto:andre.barg...@udo.edu wrote: On 1/28/2015 2:51 PM, André Bargull wrote: For a reference, here's how Java (tried w/ Oracle 1.8.0_31 and openjdk 1.7.0_65

Re: Q: Lonely surrogates and unicode regexps

2015-01-28 Thread André Bargull
Cool, thanks for clarifications! To make sure, as per the intended semantics, we never allow splitting a valid surrogate pair (= matching only one of the surrogates but not the other), and thus we'll differ from the Java implementation here: /foo(.+)bar\1/u.test(foo\uD834bar\uD834\uDC00); we

Re: Very large array indices and unshift/splice

2014-10-27 Thread André Bargull
On 10/27/2014 5:09 PM, Allen Wirfs-Brock wrote: On Oct 26, 2014, at 8:58 PM, Brendan Eich wrote: Allen Wirfs-Brock wrote: Arguably a design bug, rather than a spec. bug. But I'm assuming that who ever originally wrote up these algorithms were being intentional about such things. Design,

Re: Very large array indices and unshift/splice

2014-10-24 Thread André Bargull
Unlikely, given what Adam reported: V8 properly throws a range error, but fails to move the element up one index. SpiderMonkey hangs (presumably because it has no special logic to deal with very large, sparse arrays). JSC throws an Out of memory Error and also fails to move the element up one

Re: for-of loops, IteratorClose and the rest of the iterations in the spec

2014-09-10 Thread André Bargull
/ Seems to me like it's just a matter of wrapping the relevant bits (which ones, though? // whatever constitutes the loop body // // OK. That's fairly straightforward. // // You also will need a finally clause, if the loop body contains any explicit returns. // // It only does when

Re: Question about GetBindingValue

2014-08-29 Thread André Bargull
Hello, We found one dead part in ES5 and we're wondering whether we're missing something here. The question is about the 4th step in Section 10.2.1.2.4 GetBindingValue(N, S): 10.2.1.2.4 GetBindingValue(N,S) The concrete Environment Record method GetBindingValue for object environment

Re: String(symbol)

2014-08-26 Thread André Bargull
Claude Pache wrote: / Personally, I use the following expression in order to coerce a variable to a string: // // var obj = this + '' // // and its in-place variant: // // x += '' // // I think it'll continue to work in ES6. / Agreed, this is the correct-and-most-concise way

Re: Why are Symbol.* all non-configurable and non-writable?

2014-07-21 Thread André Bargull
Because somebody thought it was a good idea ;-) ... I'd say for consistency with other constant value properties (NaN, Infinity, undefined, Math.*, Number.*). On Jul 21, 2014, at 1:04 PM, Boris Zbarsky wrote: / Is this meant to prevent people tampering with them? // // In that case,

Re: ES6 classes: deferring the creation step

2014-07-06 Thread André Bargull
Moreover, the Completion record (either normal or abrupt) returned from [[Call]] will hold an additional [[thisValue]] field, which, unless otherwise specified: * is set to the original `thisArgument` if it was not empty; or, * is set to the value (at the time of completion) of the

Re: @@new

2014-06-19 Thread André Bargull
The most important thing here (I agree with Andreas R.) is -- if possible -- avoiding uninitialized object observability. I agree that uninitialized observability is a pain and has been a on-going source of reentrancy bugs in the the more complex built-in constructors. I want to explore

Re: IsConstructor

2014-06-13 Thread André Bargull
One question about @@create though... What would this do: function Foo () {} Foo.prototype[Symbol.create] = null; // ??? // Maybe error out, like currently host objects without [[Construct]]: // TypeError: Foo is not a constructor. new Foo(); - Jussi ```javascript function Foo(){}

Re: 6 June 2014 TC39 Meeting Notes

2014-06-12 Thread André Bargull
Thanks for the notes, Ben! Looks like a real slog but it's much appreciated. On Wed 11 Jun 2014 18:28, Ben Newman benjamin at cs.stanford.edu https://mail.mozilla.org/listinfo/es-discuss writes: / ## Async Generator Functions (Jafar presenting) // (Jafar to send slides) / Looking forward

Re: IsConstructor

2014-06-12 Thread André Bargull
I'd be most interested in seeing if we can remove IsConstructor entirely (except for uses where it's just a guard, implementing the semantics of `new` via IsConstructor - [[Construct]] or throw). It seems like there's at least some movement toward removing it from `Array.of` and `Array.from`.

Re: Standard builtins' prototypes and toString

2014-06-12 Thread André Bargull
On Jun 12, 2014, at 5:26 AM, Till Schneidereit wrote: / While working on changing Date.prototype to be a plain object in SpiderMonkey, we realized that there's an issue: the way things are specced now, `alert(Date.prototype)` will throw, because `Date.prototype.toString` isn't generic. The

Re: Null iterable in for-of?

2014-06-12 Thread André Bargull
On Jun 12, 2014, at 2:36 PM, Erik Arvidsson wrote: / Somehow I missed when we decided to allow null/undefined as the iterable value in for-of loops. // // The following test passes using the spec algorithms: // // var c = 0; // for (var x of null) { //c++; // } // assert.equal(c,

Re: Null iterable in for-of?

2014-06-12 Thread André Bargull
Corrected link: https://bugs.ecmascript.org/show_bug.cgi?id=2737 On 6/13/2014 12:16 AM, André Bargull wrote: On Jun 12, 2014, at 2:36 PM, Erik Arvidsson wrote: / Somehow I missed when we decided to allow null/undefined as the iterable value in for-of loops. // // The following test

Re: IsConstructor

2014-06-11 Thread André Bargull
[*] Proxies are oddballs here. All Proxies have a [[Construct]] method so the IsConstructor will always return true which is really not what you want. If IsConstructor was changed to check for a .prototype instead proxies would behave more inline with ordinary objects. [[Construct]] is only

Re: IsConstructor

2014-06-11 Thread André Bargull
Quick note: that isConstructor isn't really viable unless you plan on using it with constructors that do not have side effects. Rick The Proxy-based solution needs to be used in these cases. Now we just need to wait until Proxies are available everywhere! ;-) On Wed, Jun 11, 2014 at

Re: IsConstructor

2014-06-11 Thread André Bargull
On 6/11/2014 5:40 PM, Alexandre Morgaut wrote: On 11 juin 2014, at 17:11, André Bargull andre.barg...@udo.edu wrote: Quick note: that isConstructor isn't really viable unless you plan on using it with constructors that do not have side effects. Rick The Proxy-based solution needs

Re: My ECMAScript 7 wishlist

2014-06-07 Thread André Bargull
that `has:()=true` breaks with features detections that are meant to be less obtrusive than getters ... i.e. `'geolocation' in navigator` or `'innerHTML' in genericNode` and all others that are not supposed to pass through a potentially expensive getter to retrieve a feature detection purpose

Re: A bit confused by B.3.2 - Web Legacy Compatibility for Block-Level Function Declarations

2014-06-06 Thread André Bargull
Or a link to the discussion that led to the content of this section? There have been multiple discussions on this topic, on both es-discuss and during TC39 meetings, so it's hard to point to a single discussion. For example:

Re: Assignment to wrapper objects in strict mode

2014-05-28 Thread André Bargull
Apparently, there has been a semantic change between ES5 and ES6 regarding assignment to wrapper objects in strict mode. That is, 'use strict'; .x = 0 would throw in ES5, but AFAICS, no longer does in ES6. Was this change discussed? What is the rationale? (FWIW, current implementations

Re: Assignment to wrapper objects in strict mode

2014-05-28 Thread André Bargull
On 5/28/2014 2:00 PM, Andreas Rossberg wrote: On 28 May 2014 13:41, André Bargull andre.barg...@udo.edu wrote: Apparently, there has been a semantic change between ES5 and ES6 regarding assignment to wrapper objects in strict mode. That is, 'use strict'; .x = 0 would throw in ES5

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread André Bargull
On May 1, 2014, at 2:50 AM, Jason Orendorff jason.orendorff at gmail.com https://mail.mozilla.org/listinfo/es-discuss wrote: / // As specified, proxies can do this: // // js Object.isFrozen(proxy) // true // js Object.getOwnPropertyDescriptor(proxy).configurable // true / No,

Re: Perhaps @@unscopable shouldn't be a Set...

2014-04-30 Thread André Bargull
Where do you find the spec incomplete WRT @@unscopable. My recollection was that it was all resolved and fully specified and that I was relatively happy with the outcome. unscopables for the Object Environment Record is always the empty list. It's never populated. Allen On May 1,

Re: Perhaps @@unscopable shouldn't be a Set...

2014-04-30 Thread André Bargull
The changes from https://bugs.ecmascript.org/show_bug.cgi?id=1908 never made it into the spec. On 4/30/2014 11:41 PM, André Bargull wrote: Where do you find the spec incomplete WRT @@unscopable. My recollection was that it was all resolved and fully specified and that I was relatively happy

Re: Clarify the destructuring syntax

2014-04-11 Thread André Bargull
Hi Erop, On Fri, Apr 11, 2014 at 12:35 PM, termi1uc1 at gmail.com https://mail.mozilla.org/listinfo/es-discuss wrote: / 1. Should the AssignmentExpression of DestructuringAssignment always to be // the Object type? // ```javascript // let {length} = 123; // assert(length,

Re: Clarify the destructuring syntax

2014-04-11 Thread André Bargull
On 4/11/2014 2:02 PM, Егор Николаев wrote: @André Bargull Are there any reasons for these restrictions? It confuses me. If I can for-of over string, so why can't I destructuring it? I'd say it's mostly a language designer decision and it may still change before the final specification

Re: Object.getOwnPropertyDescriptors(O) ? // plural

2014-03-06 Thread André Bargull
I would rephrase into this: if you need a getOwnPropertyNames trap, you might need for consistency a getOwnPropertySymbols independently from getOwnPropertyDescriptors since these methods are already available. While it shares the same name with Object.getOwnPropertyNames(), this

Re: Object.getOwnPropertyDescriptors(O) ? // plural

2014-03-06 Thread André Bargull
On 3/6/2014 10:24 PM, Brendan Eich wrote: André Bargull mailto:andre.barg...@udo.edu March 6, 2014 at 1:21 PM I would rephrase into this: if you need a getOwnPropertyNames trap, you might need for consistency a getOwnPropertySymbols independently from getOwnPropertyDescriptors since

Re: Object.getOwnPropertyDescriptors(O) ? // plural

2014-03-06 Thread André Bargull
Object.isFrozen(). Please let me know and I'll update. Best Regards On Thu, Mar 6, 2014 at 1:21 PM, André Bargull andre.barg...@udo.edu mailto:andre.barg...@udo.edu wrote: I would rephrase into this: if you need a getOwnPropertyNames trap, you might need

Re: Changing behavior of Array#copyWithin when used on array-like with negative length

2014-02-17 Thread André Bargull
On 2/14/2014 11:40 PM, C. Scott Ananian wrote: On Fri, Feb 14, 2014 at 11:50 AM, André Bargull andre.barg...@udo.edu wrote: I think Scott is requesting this change: https://gist.github.com/anba/6c75c34c72d4ffaa8de7 Yes, although my proposed diff (in the linked bug) was the shorter, 12. If end

Re: restrictions on let declarations

2014-02-14 Thread André Bargull
On 30/01/2014, at 17:13, Brendan Eich wrote: / // // Interesting! // // You don't want the alert to show undefined, so the extent of the inner binding in your model is the unbraced consequent of the if. // // That is not block scope in any plain sense. / How about this? let x= 0; if

Re: Changing behavior of Array#copyWithin when used on array-like with negative length

2014-02-14 Thread André Bargull
On Feb 14, 2014, at 12:46 PM, C. Scott Ananian wrote: / For reference:https://bugs.ecmascript.org/show_bug.cgi?id=2546 // // `Array#copyWithin` has a (non-normative) signature of `(target, start, // end = this.length)`. However, this is slightly misleading because the // spec actually

Re: Behavior of `eval` in non strict mode.

2014-01-08 Thread André Bargull
Thanks for the reply. I'd actually expect `undefined` because function declarations does not return anything. Converting it to a function expression kind of misses the point since those are well... expressions :) I've tried looking in all the relevant places in the spec but still couldn't

Re: Generator Arrow Functions

2013-11-26 Thread André Bargull
On 11/26/2013 02:28 PM, Claude Pache wrote: / From the thread [1], I guess that parsing correctly the following thing would be obnoxious (at best)? // // (a = yield/b/g) =* {} // // ---Claude / Indeed. And you can make even more obnoxious parses of the hypothetical combination of

Re: Generator Arrow Functions

2013-11-26 Thread André Bargull
On 11/27/2013 12:07 AM, Waldemar Horwat wrote: On 11/26/2013 03:00 PM, André Bargull wrote: On 11/26/2013 02:28 PM, Claude Pache wrote: / From the thread [1], I guess that parsing correctly the following thing would be obnoxious (at best)? // // (a = yield/b/g) =* {} // // —Claude

Re: Novel operator syntax

2013-10-29 Thread André Bargull
Got it, thanks. We could indeed do .+, .*, etc. without ambiguity. (Ignore E4X's wildcards: xml.* etc.!) /be No. ;-) js 1.*2 2 - André ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Novel operator syntax

2013-10-29 Thread André Bargull
On 10/29/2013 7:51 PM, Tristan Zajonc wrote: Right you are. That was the same issue with Python. Are there any blockers to ~*? There are the usual ASI problems. For example this is currently valid: ``` a ~+ b ``` It is parsed as: ``` a; ~+ b; ``` On Tue, Oct 29, 2013 at 11:46 AM, André

Re: Object.assign and __proto__ property

2013-10-22 Thread André Bargull
Traceur has: function assign(target, source) { var props = $getOwnPropertyNames(source); var p, length = props.length; for (p = 0; p length; p++) { target[props[p]] = source[props[p]]; } return target; } Which is correct. Almost correct ;-) Exception handling and

Re: Object.assign and exceptions (was: Object.assign and __proto__ property)

2013-10-22 Thread André Bargull
} and Object.seal/freeze. This was also covered in the thread starting at https://mail.mozilla.org/pipermail/es-discuss/2012-December/027067.html . - André On Tue, Oct 22, 2013 at 6:41 AM, André Bargull andre.barg...@udo.edu mailto:andre.barg...@udo.edu wrote: ... A more conformant implementation

Re: `String.prototype.symbolAt()` (improved `String.prototype.charAt()`)

2013-10-18 Thread André Bargull
/ I disagree. In those situations you should just iterate over the string using `for...of`. / That seems to iterate over code units as far as I can tell. for (var x of ?) print(x.charCodeAt(0)) invokes print() twice in Gecko. SpiderMonkey does not implement the (yet to be) spec'ed

Re: has the syntax for proxies been finalized ?

2013-10-18 Thread André Bargull
Follow up question for Tom et al... Using require('harmony-reflect') var t = {a:3, c:4}; var p = Proxy( t, { get: function() {}, delete: function(t,x) { console.log('deleting'); delete t.a; } } ); delete p.c p; //{a:3} t; //{a:3} the console.log is not

Re: `String.prototype.symbolAt()` (improved `String.prototype.charAt()`)

2013-10-18 Thread André Bargull
On Oct 18, 2013, at 4:01 PM, Allen Wirfs-Brock wrote: / // On Oct 18, 2013, at 1:29 PM, Allen Wirfs-Brock wrote: // // Array.from( '???'))[1] // // maybe even better: // // Uint32Array.from( '???'))[1] / err...maybe not if you want a string value:

Re: Object.mixin, why just for enumerables (?)

2013-10-03 Thread André Bargull
Object.mixin, why just for enumerables (?) It's a copy-paste error in the draft: https://bugs.ecmascript.org/show_bug.cgi?id=1999#c1 This is related to: http://mozilla.6506.n7.nabble.com/Object-define-Object-mixin-tp265638p265651.html In a spec we have both Object.assign and

Re: Clarification on function default param values

2013-10-01 Thread André Bargull
/ Brandon Benvie mailto:bbenvie at mozilla.com https://mail.mozilla.org/listinfo/es-discuss // September 30, 2013 8:48 PM // I'm actually now really curious what the following does: // // ``` // function foo(x, y = (() = { arguments[0] = foo; return bar })()) { //return [x, y]; // } /

Re: bugs.ecmascript.org appears to be down

2013-09-29 Thread André Bargull
Could someone give it a nudge? -Michael Per #it on irc.mozilla.org scl3 is down, apparently some maintenance work per user Usul. So not only bugs.ecmascript.org. - André ___ es-discuss mailing list es-discuss@mozilla.org

Re: bugs.ecmascript.org appears to be down

2013-09-29 Thread André Bargull
On 9/29/2013 7:51 PM, André Bargull wrote: Could someone give it a nudge? -Michael Per #it on irc.mozilla.org scl3 is down, apparently some maintenance work per user Usul. So not only bugs.ecmascript.org. - André (10:51:27) wicked: how long will it take? (10:51:45) digi: wicked: just

Re: Comments on Sept Meeting Notes

2013-09-27 Thread André Bargull
/ Whether you personally use it, for-in is a reality. Introspection of // objects happens, so if you ship a library that's putting meta-level // properties into objects it needs to make them non-enumerable to be robust // in the face of client code that uses for-in but isn't prepared to //

Re: Comments on Sept Meeting Notes

2013-09-27 Thread André Bargull
On 9/27/2013 9:58 PM, Kevin Smith wrote: In this case I doubt @iterator or @toStringTag should be visible. (And I know there a better ways to test for empty objects, but for-in testing is common enough...) Thanks Andre! I fear this example merely begs the question of whether such

Re: [[Invoke]] and implicit method calls

2013-09-24 Thread André Bargull
Short summary: The current (rev18) [[Invoke]] design allows this code to work (use case A): js``` var p = new Proxy(new Map, {}); // Map.prototype.get is not generic, requires proper Map instance p.get(key); ``` But it does not allow to use (use case B): js``` var p = new Proxy(new Map, {});

Re: Removing Proxy hasOwn() trap (Was: [[Invoke]] and implicit method calls)

2013-09-24 Thread André Bargull
On Sep 24, 2013, at 8:13 AM, Jason Orendorff wrote: / On Tue, Sep 24, 2013 at 7:23 AM, Tom Van Cutsem tomvc.be at gmail.com https://mail.mozilla.org/listinfo/es-discuss wrote: // [forking from [[invoke]]-thread for clarity] // // Thanks! // // Allen: would the removal of the hasOwn()

Re: [[Invoke]] and implicit method calls

2013-09-19 Thread André Bargull
Back to option 2: Redesign [[Invoke]] from https://mail.mozilla.org/pipermail/es-discuss/2013-August/032718.html ? - André What if we made invoke take either an identifier to call, or a got function to call? Then get+invoke would pass the got function. /be Allen Wirfs-Brock

Removal of NoIn grammar productions and for-loop parsing

2013-08-31 Thread André Bargull
The NoIn grammar productions have been removed in rev17. Does this mean that `for (a in b;;);` is now a valid (C-style) for-loop instead of a SyntaxError? Thanks, André ___ es-discuss mailing list es-discuss@mozilla.org

Array.prototype.slice web-compat issue?

2013-08-28 Thread André Bargull
This test case [1] from SpiderMonkey failed when I applied the latest spec changes to my ES6 test implementation. Based on the bug report at [2], this might be another web-compatibility issue - but is that really the case? Any input appreciated! Thanks, André [1]

Re: The generator.next() method

2013-08-23 Thread André Bargull
`g.next()` returns `{value: [1, 2, 3], done: false}` for me, so .value is needed here. Or do you mean something else? Thanks, André No .value anywhere, though. /be Forbes Lindesay wrote: / It already is dealt with via destructuring assignments: // // ```js // function* gen() { // var

Re: Lexical scoping of 'function' in sloppy mode breaks legal ES5

2013-08-20 Thread André Bargull
On 19 August 2013 19:02, Allen Wirfs-Brock allen at wirfs-brock.com https://mail.mozilla.org/listinfo/es-discuss wrote: / // On Aug 19, 2013, at 8:38 AM, Andreas Rossberg wrote: // // While debugging a V8 issue I just realised another incompatibility // with introducing lexical function

Re: GeneratorFunctionPrototype should probably be a function

2013-08-13 Thread André Bargull
Hi, Section 15.19.3.3 of the July 15 draft says: Properties of the GeneratorFunction Prototype Object The GeneratorFunction prototype object is an ordinary object. It is not a function object and does not have a [[Code]] internal data property or any other of the internal

Re: Proxy-for-array transparency issues

2013-07-30 Thread André Bargull
/ * ArrayBuffer.isView // yup. The use cases for isView aren't all that clear to me. It could be // expressed a @@isView test if it has important use cases. / I'm not familiar enough with ArrayBuffers to understand the consequences. By analogy with Array.isArray, if a proxy-for-arraybuffer

Re: Completion Records

2013-07-28 Thread André Bargull
Looking at the ES6 spec draft, I've drawn the following conclusions about Completion Records. Can someone confirm? If [[type]] is 'normal', 'return', or 'throw', [[target]] must be 'empty' (can't be an identifier). Moreover, if [[type]] is 'return' or 'throw', [[value]] must be a

Re: How primitive are Symbols? Bignums? etc

2013-07-15 Thread André Bargull
Allen (cc-ed) changed symbols back to objects in draft rev 16 (https://bugs.ecmascript.org/show_bug.cgi?id=1546#c2), so I guess Object(x) will still work in ES6 to test for object types. - André I see. That's unpleasant. In ES5, Object(x) can never throw, and so the code paths using |x ===

Re: Language Negotiation API

2013-07-13 Thread André Bargull
On Thu, Jul 11, 2013 at 11:52 PM, Zbigniew Braniecki zbraniecki at mozilla.com https://mail.mozilla.org/listinfo/es-discuss / wrote: [...] // /1) CanonicalizeLanguageTag [1] / // Because language tags come from developers and users, ability to // canonicalize them is crucial to us. ECMA 402

Re: Language Negotiation API

2013-07-13 Thread André Bargull
On 7/13/2013 8:48 PM, Andy Earnshaw wrote: On Sat, Jul 13, 2013 at 1:05 PM, André Bargull andre.barg...@udo.edu mailto:andre.barg...@udo.edu wrote: ... Only exposing CanonicalizeLanguageTag does not seem useful to me without having access to IsStructurallyValidLanguageTag. Most

Re: [syntax] arrow function notation is too greedy

2013-07-11 Thread André Bargull
On Thu, Jul 11, 2013 at 2:00 AM, Andrew Fedoniouk news at terrainformatica.com https://mail.mozilla.org/listinfo/es-discuss wrote: / Did we consider green gases emission increase that will happen due to that // double parsing of code that currently is parsed strictly once? // // ( Consider

Re: Automatically binding extracted methods

2013-06-14 Thread André Bargull
@@create allows you to set up instance prototypes, here's an amended version of your example code using ES6 classes: https://gist.github.com/anba/9f0acbb29bf755d26f37 The updated version also gets rid of the origProto workaround, but requires a custom @@hasInstance hook. I've tested the

Re: Why can’t for-of be applied to iterators?

2013-06-12 Thread André Bargull
Just for the record: Prototype lookup in ClassDefinitionEvaluation changed in draft rev. 14., so an API function should rather look like: Mixin = (base, ...mixins) = mixins.reduce(Object.mixin, class extends base {}.prototype).constructor At least users now no longer need to access

Re: Iteration protocol: a sentinel value?

2013-05-14 Thread André Bargull
The sentinel cannot carry a return value, from the notes: DH: Mark's proposal is broken, because it doesn't work with return values of generators. MM: Agreed. In the TC39 meeting notes, Mark suggested something similar (but more sophisticated) which was rejected and I am wondering why.

Re: Iteration protocol: a sentinel value?

2013-05-14 Thread André Bargull
); [1] http://wiki.ecmascript.org/doku.php?id=harmony:generators#returning On 5/14/2013 1:32 PM, Axel Rauschmayer wrote: Thanks! Can you elaborate? On May 14, 2013, at 9:20 , André Bargull andre.barg...@udo.edu mailto:andre.barg...@udo.edu wrote: The sentinel cannot carry a return value, from

Re: B.3.1 The __proto__ pseudo property

2013-04-21 Thread André Bargull
SpiderMonkey at least goes out of its way to do [[Set]] (let's call it) not [[DefineOwnProperty]] for 'o = {__proto__: 42}', so why wouldn't [[Set]] create a fresh property, seeing nothing on Object.prototype named '__proto__' with a setter to run? SpiderMonkey/JSC currently just use [[Set]]

Re: Syntax error for lexical declarations not directly within block

2013-04-15 Thread André Bargull
Statements and Declarations are separate production rules (cf. 12 Statements and Declarations in the draft), only a Statement can be nested directly within an if-Statement. - André Hi, I've noted that it is a Syntax error to write things like `if (foo) let x;` or `while (bar) let x;`

Re: bugs.ecmascript.org database is slow today

2013-04-12 Thread André Bargull
It improved a bit, I've just added a new bug and the loading time was only one minute instead of two minutes. - André On 4/12/2013 3:21 AM, Brendan Eich wrote: I heard some db cleaning was just done -- any improvements? /be André Bargull wrote: A bit off topic: bugs.ecmascript.org

bugs.ecmascript.org database is slow today

2013-04-11 Thread André Bargull
A bit off topic: bugs.ecmascript.org is extremely slow today, when I file a new issue, the browser loads for about two minutes. And I even got multiple mid-air collision detection errors for my own (!) changes. Maybe someone can take a look and figure out what's going on there. (The search

Re: Questions/issues regarding generators

2013-03-30 Thread André Bargull
/ The most significant change from the meeting (and it really wasn't // explicit on the whiteboard) is that generator prototypes don't have a // constructor property that links back to its generator function instance. // In other words, you can't say: // // function * ofCollection() {for (i

Re: Re: Two different use cases for privacy?

2013-03-25 Thread André Bargull
The function for use case #1 seems to be Object.getOwnPropertyKeys() [15.2.3.15]: js Object.keys(Array) [] js Object.getOwnPropertyNames(Array) [length,name,prototype,isArray,of,from,caller,arguments] js [for (x of Object.getOwnPropertyKeys(Array)) x]

Re: Upcoming talk on ES6 in Russia

2013-03-23 Thread André Bargull
On March 30, I'll hold a talk on ECMAScript 6 at CodeFest 2013 in Novosibirsk [1] where I hope to convince people that they have something to look forward to. A draft of my slides is here, feedback welcome: http://dl.2ality.com/codefest_es6.pdf [1]http://2013.codefest.ru/ -- Dr. Axel

Re: get/setIntegrity trap (Was: A case for removing the seal/freeze/isSealed/isFrozen traps)

2013-03-17 Thread André Bargull
The incompatibility you've noticed is just a spec bug in [[HasIntegrity]]. In step 2a of 8.3.3, the value of [[Extensible]] needs to be inverted. With that change applied, the code snippet will return `true`. - André

Re: Invalid Octal Escapes in Regular Expressions

2012-03-16 Thread André Bargull
Thanks for your answer, then I'm looking forward to the meeting results. - André PS: Here's another difference, /^\$/ matches \0 in SM, JSC and Opera, whereas in IE10 and V8 it matches \u0 (that's \0 concat'ed with 0). Per [2] it ought to be \u0. On 3/16/2012 2:05 AM, Luke

Invalid Octal Escapes in Regular Expressions

2012-03-15 Thread André Bargull
Although not specified in ES5, octal escapes are required in regular expressions for web reality [1,2]. [1] even claims the extensions are extensive and consistent across browsers. But for invalid octal escapes, the browsers are not consistent. For example: /^\8$/ matches \\8 in Spidermonkey,

Re: Mailing list reminder: password is sent in the clear

2011-07-01 Thread André Bargull
Log-in at [1] and remove the option to send a monthly password remainder? *Get password reminder email for this list?* Once a month, you will get an email containing a password reminder for every list at this host to which you are subscribed. You can turn this off on a per-list basis by

Re: do-while grammar

2011-02-08 Thread André Bargull
Just for the record, here's a link to the bug report on bugzilla concerning ASI for do-while: https://bugzilla.mozilla.org/show_bug.cgi?id=238945 (Interesting that I came across the very same issue in January while working on the OpenLaszlo parser code :-) FWIW, JavaScriptCore provides

Allen's lambda syntax proposal

2008-12-04 Thread André Bargull
My example: x = x * x ^(a,b,c,d,e,f,g) { x } is not a syntax error, but it also (unfortunately) doesn't contain a lambda expression. Or am I missing something? Or a bit more obvious than the use of the comma-operator: As soon as named lambdas are introduced (the weak spot on the \