Re: Property descriptor normalization (Was: General comments response (was Re: ES6 Rev13 Review: MOP-refactoring, symbols, proxies, Reflect module))

2013-01-03 Thread Tom Van Cutsem
2013/1/3 Allen Wirfs-Brock al...@wirfs-brock.com On Dec 31, 2012, at 3:37 AM, Tom Van Cutsem wrote: [...] However, this semantics also implies that: 1) pd2 is not a completed property descriptor, lacking a writable/enumerable attribute. Only the internal property descriptor was fully

GetValue of DataView doesn't guarantee target in range

2013-01-03 Thread Yusuke Suzuki
Hello all, According to rev13 draft section 15.13.7.4 step 4, 4. If totalOffset ≥ byteLength, throw a RangeError exception. But this doesn't guarantee target in range of buffer. For example, var view = new DataView(new ArrayBuffer(1)); view.getUint32(0); In above example, calling

Re: GetValue of DataView doesn't guarantee target in range

2013-01-03 Thread Allen Wirfs-Brock
The DavaView section is still a early and very rough draft that is due for a total rewrite. I've made a node that this specific formula needs to be fixed. Allen On Jan 3, 2013, at 5:49 AM, Yusuke Suzuki wrote: Hello all, According to rev13 draft section 15.13.7.4 step 4, 4. If

Re: GetValue of DataView doesn't guarantee target in range

2013-01-03 Thread Yusuke Suzuki
Ah, sorry. I thought it is an issue of ArrayBuffer. On Fri, Jan 4, 2013 at 2:50 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: The DavaView section is still a early and very rough draft that is due for a total rewrite. I've made a node that this specific formula needs to be fixed.

Re: 10 biggest JS pitfalls

2013-01-03 Thread Quildreen Motta
I'm still amazed to see people rant about other people's perfectly fine coding styles, when those are an overtly subjective matter, and therefore no argumentation on whether Yes ASI or Nay ASI can be right. The only facts about ASI are: 1.) It's a syntax error; 2.) Such syntax error is spec'd to

Re: Property descriptor normalization (Was: General comments response (was Re: ES6 Rev13 Review: MOP-refactoring, symbols, proxies, Reflect module))

2013-01-03 Thread Allen Wirfs-Brock
On Jan 3, 2013, at 12:18 AM, Tom Van Cutsem wrote: 2013/1/3 Allen Wirfs-Brock al...@wirfs-brock.com On Dec 31, 2012, at 3:37 AM, Tom Van Cutsem wrote: [...] However, this semantics also implies that: 1) pd2 is not a completed property descriptor, lacking a writable/enumerable

Re: fail-fast object destructuring (don't add more slop to sloppy mode)

2013-01-03 Thread Allen Wirfs-Brock
On Jan 2, 2013, at 7:58 PM, Brendan Eich wrote: I think we can do this now. Allen should weigh in. Hope to hear from Andreas R. soon too! Apologies for the long thread, and thanks to Herby for interaction that clarified many things. Perhaps I should resummarize: The best new-new plan

RE: fail-fast object destructuring (don't add more slop to sloppy mode)

2013-01-03 Thread Nathan Wall
Brendan Eich wrote:  Herby Vojčík wrote: Now I am confused. For (p.q?).r to be same as p.q?.r, (p.q?) must return reified Nil, not undefined. I was at the impression you say Nil at the background, but whenever it becomes observable, it should be changed to undefined. That means p.q?

Re: fail-fast object destructuring (don't add more slop to sloppy mode)

2013-01-03 Thread Brendan Eich
Nathan Wall wrote: Brendan Eich wrote: Herby Vojčík wrote: Now I am confused. For (p.q?).r to be same as p.q?.r, (p.q?) must return reified Nil, not undefined. I was at the impression you say Nil at the background, but whenever it becomes observable, it should be changed to undefined. That

multiple return values... like ruby

2013-01-03 Thread anders elo
I'd like to propose the incorporation of multiple return values into the ES standard. function foo(){ return 1,2,3; } let (a,b,c) = foo(); let (a,b) = foo(); // ignore c let (a,...b) = foo() // a = 1, b = [2,3] /* also useful for asynchronous functions returning a promise */ let

Re: multiple return values... like ruby

2013-01-03 Thread Anton Kovalyov
See here: http://wiki.ecmascript.org/doku.php?id=harmony:destructuring and https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.7#Destructuring_assignment_%28Merge_into_own_page.2Fsection%29 Anton On 3 January 2013 07:26, anders elo and...@kaerus.com wrote: I'd like to

RE: multiple return values... like ruby

2013-01-03 Thread Nathan Wall
Anton Kovalyov wrote: anders elo wrote: I'd like to propose the incorporation of multiple return values into  the ES standard.    function foo(){  return 1,2,3;  }    let (a,b,c) = foo();    let (a,b) = foo(); // ignore c    let (a,...b) = foo() // a = 1, b = [2,3]    /* also useful for

Re: multiple return values... like ruby

2013-01-03 Thread Brendan Eich
Brendan Eich wrote: function pair(x, y) { return [x, h]; } s/h/y/ there of course! let [x, y] = pair(3,4); And Nathan beat me to it -- sorry for not updating mail before replying... /be ___ es-discuss mailing list es-discuss@mozilla.org