Re: JavaScript Language feature Idea

2016-04-16 Thread Axel Rauschmayer
Another possibility is `Array.prototype.get()`, which would be in line with ES6 Maps. > On 02 Feb 2016, at 21:15, Jonas Sicking wrote: > > On Mon, Jan 25, 2016 at 12:38 PM, Andrea Giammarchi > wrote: >> FWIW `.at` works for me. Anything really,

Re: Function#toString revision: JSDoc comments?

2016-04-16 Thread Jordan Harband
As I see it, the primary purpose of the `Function#toString` proposal is to document what browsers already do, and tighten it down so they can't deviate further (which some browsers already have begun to do with "class", for example). "Preceding comments" would be a very hard thing to specify

Re: Function#toString revision: JSDoc comments?

2016-04-16 Thread Marius Gundersen
Would it not be better to expose the names (and default values, destructurings, etc) of the function arguments using reflection? For example, Reflection.arguments(Math.max).then this method can return any JSDoc it is able to parse. On 16 Apr 2016 16:53, "Caitlin Potter"

Re: Function#toString revision: JSDoc comments?

2016-04-16 Thread Caitlin Potter
How would that interact with angular.js' Function.prototype.toString parsing? Seems like doing that could break some content, even if it were useful > On Apr 16, 2016, at 10:48 AM, Axel Rauschmayer wrote: > > Regarding this proposal: >

Function#toString revision: JSDoc comments?

2016-04-16 Thread Axel Rauschmayer
Regarding this proposal: https://github.com/tc39/Function-prototype-toString-revision Wouldn’t it make sense to include a preceding JSDoc-style comment in a function’s (or method’s) `[[SourceText]]` value? Conceptually it is a part

Re: Re: Take let variable out of temporal dead zone

2016-04-16 Thread Awal Garg
Not possible. Previous discussion: https://esdiscuss.org/topic/global-lexical-tier (the one Jason mentioned above). Key take-away from the above, which is admittedly sad: > When it comes to aesthetics vs. implementability and usability, we have to throw aesthetics under the bus. This is