Re: Super-references

2013-03-09 Thread Axel Rauschmayer
The question I tried to answer was: Now, how transpilers are going to solve Object.mixin super call? 'cause once again, that should be solved runtime and I am curious, without caller, how transpilers are thinking to solve that. I assumed you didn’t know, which is why I wrote an answer.

Re: Identifying ECMAScript identifiers

2013-03-09 Thread Yusuke SUZUKI
The functions I proposed accept both numbers and strings. http://wiki.ecmascript.org/doku.php?id=strawman:identifier_identification Ah, I see. I missed what is intended at step 2. Looks very nice, thanks. On Sat, Mar 9, 2013 at 6:29 AM, Norbert Lindenberg ecmascr...@lindenbergsoftware.com

Re: Identifying ECMAScript identifiers

2013-03-09 Thread gaz Heyes
On 9 March 2013 01:59, Ariya Hidayat ariya.hida...@gmail.com wrote: If you check Yusuke's links, that is exactly what Esprima is doing. The use of regular expression is reserved only for the slow/uncommon code path. Yeah I can see you are converting a char code into a string using

Re: a future caller alternative ?

2013-03-09 Thread Jorge Chamorro
On 09/03/2013, at 00:54, Andrea Giammarchi wrote: Mark, that is an exhaustive list of links and talks but how many real use cases where we let the user inject any sort of script code in the website and we inject malicious libraries we are not aware, compared with the number of all

Re: Identifying ECMAScript identifiers

2013-03-09 Thread Allen Wirfs-Brock
Norbert, Can you explain why you think these should be functions on String rather than part of a more general character classification facility that might be associated with some more specialized object? The latter approach would seem to be to have modularity advantages at both the

Re: a future caller alternative ?

2013-03-09 Thread Andrea Giammarchi
but then again, the list of problems is massive here if it's about trustiness. Object.prototype can be enriched or some method changed, parseInt and parseFloat can be redefined to change payment details and stuff, String.prototype.trim can be faked to read all written fields before these are sent

Re: a future caller alternative ?

2013-03-09 Thread David Bruant
Le 08/03/2013 22:19, Andrea Giammarchi a écrit : This opens doors to debuggers (introspection) and APIs magic quite a lot. If you want to write a debugger, use a debugger API [1] which is only executed in privileged environments, no? Debuggers are useful, but pierce encapsulation which is

Re: Identifying ECMAScript identifiers

2013-03-09 Thread Peter van der Zee
Norbert, for the sake of completeness; ZeParser (http://github.com/qfox/zeparser) does support complete unicode identifiers ZeParser2 (http://github.com/qfox/zeparser2) doesn't (I simply didn't bother) - peter ___ es-discuss mailing list

Questions on Proper Tail Calls

2013-03-09 Thread Angus Croll
1. Will proper tail calls only happen in strict mode, and if not are we ok with losing backwards compatibility re. [function].caller and [ callingFunction].arguments? 2. Will tail call behavior apply regardless of the tail call syntax? (fn(), fn.call, fn.apply)? 3. Will tail call behavior apply

Re: a future caller alternative ?

2013-03-09 Thread Andrea Giammarchi
I do NOT want to write a debugger and yet I need caller, can you imagine ? Andrea On Sat, Mar 9, 2013 at 10:44 AM, David Bruant bruan...@gmail.com wrote: Le 08/03/2013 22:19, Andrea Giammarchi a écrit : This opens doors to debuggers (introspection) and APIs magic quite a lot. If you want

Re: a future caller alternative ?

2013-03-09 Thread Kevin Gadd
I really don't understand why the debugger thing is being trotted out again. It was addressed at the beginning of the thread: There are lots of real world applications that use debugger-style introspection (in particular, stack walking) for purposes that are not debugging. Now, to be fair, that

Re: a future caller alternative ?

2013-03-09 Thread Brendan Eich
Mark S. Miller wrote: It feels a dramatic divergence from the origin-based security model, Indeed! Origin-based security has been a nightmare. Any access control system with hand-coded access monitoring in a big C++ codebase will be. In SpiderMonkey + Gecko in Firefox, and

Re: Questions on Proper Tail Calls

2013-03-09 Thread Allen Wirfs-Brock
On Mar 9, 2013, at 3:00 PM, Angus Croll wrote: 1. Will proper tail calls only happen in strict mode, and if not are we ok with losing backwards compatibility re. [function].caller and [callingFunction].arguments? Apparently yes, there is a note in the draft that we reached that conclusion

Re: Questions on Proper Tail Calls

2013-03-09 Thread Angus Croll
Thanks Allen, those are the answers I wanted to hear :) Seems like ES 6 proper tail calls will be a good for CPS too. On Sat, Mar 9, 2013 at 5:22 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Mar 9, 2013, at 3:00 PM, Angus Croll wrote: 1. Will proper tail calls only happen in strict

Re: a future caller alternative ?

2013-03-09 Thread Mark S. Miller
On Sat, Mar 9, 2013 at 4:56 PM, Kevin Gadd kevin.g...@gmail.com wrote: I really don't understand why the debugger thing is being trotted out again. It was addressed at the beginning of the thread: There are lots of real world applications that use debugger-style introspection (in particular,

Re: a future caller alternative ?

2013-03-09 Thread Bill Frantz
It should be pointed out that KeyKOS resume keys could, like proper tail-call optimization, eliminate the ability to walk the stack to determine the caller. In KeyKOS, the process had direct control over usage of the resume key. It could pass it to an object is was calling in place or creating

Nuking misleading properties in `Object.getOwnPropertyDescriptor`

2013-03-09 Thread Nathan Wall
Given that `defineProperty` uses properties on the prototype of the descriptor[1] and `getOwnPropertyDescriptor` returns an object which inherits from `Object.prototype`, the following use-case is volatile:     function copy(from, to) {         for (let name of Object.getOwnPropertyNames(from))

RE: Nuking misleading properties in `Object.getOwnPropertyDescriptor`

2013-03-09 Thread Nathan Wall
(1) Nuke the special properties (`get`, `set`, and `value` when any of them is not defined) on a descriptor returned by `getOwnPropertyDescriptor` which shouldn't be inherited through the descriptor's prototype. By nuke them, I mean specify that they be defined as `undefined`, much like