Re: extension modules

2009-06-14 Thread David-Sarah Hopwood
kevin curtis wrote:
 Python has a concept 'extension modules' where module can be
 implemented in c/c++. Also the idea of running native code in the
 browser has been put forward by Google's native client for running x86
 in the client. MS - i think - are researching something similar.

The idea of running native code securely in the browser is speculative
and unproven. Nothing should be standardized in this area unless and
until such approaches can be demonstrated to have a reasonable chance
of resisting attack. To do so would be to repeat previous mistakes that
have led to the insecure web we currently have.

 c/c++ isn't going anywhere and the relationship between ecmascript and
 c/c++ is interesting. Are there any proposals for something like
 'extension modules' for ES6 or do the variations in the engine
 implementations preclude such a thing?

As far as a foreign function interface for non-web uses of JavaScript
is concerned, that is something that might in principle be worth
standardizing (probably separately from ES6).

However, the internal C/C++ interfaces typically used by current JS
implementations are highly error-prone, make too many assumptions about
implementation details (particularly memory management), and are not
suitable for wider use.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com


___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Array#indexOf and Array#lastIndexOf question

2009-06-14 Thread John-David Dalton
I noticed that most Array methods perform [[HasProperty]] checks on
the index values.
Array#indexOf and Array#lastIndexOf do not. Firefox 3, Safari 4,
Chrome 2 all seem to check [[HasProperty]] for Array#indexOf and
lastIndexOf.

Is this an oversight on the draft or did the browser vendors miss something ?

- John-David Dalton
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Could this be removed from Array#concat.

2009-06-14 Thread John-David Dalton
I think that under 15.4.4.4 Array.prototype.concat
 5 - b. - iii - 3 -  a. Call ToString(n). could be removed as it
is performed in c.

- John-David Dalton
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: Array#indexOf and Array#lastIndexOf question

2009-06-14 Thread Brendan Eich

On Jun 14, 2009, at 8:24 PM, John-David Dalton wrote:


I noticed that most Array methods perform [[HasProperty]] checks on
the index values.
Array#indexOf and Array#lastIndexOf do not. Firefox 3, Safari 4,
Chrome 2 all seem to check [[HasProperty]] for Array#indexOf and
lastIndexOf.

Is this an oversight on the draft or did the browser vendors miss  
something ?


Browser implementations, starting with Firerfox 1.5 / SpiderMonkey  
(JS1.6), preceded the spec, so the oversight is probably on TC39's  
part. I don't recall this coming up and a rationale for diverging from  
the de-facto standard being given.


/be

___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss