ecma262

EcmaScript 5 browser implementation

So Safari and Chrome have started in their betas to implement some ES5 stuff. For instance Object.create is in them. Do any of you know if there is a website that shows the progress made in the browsers? ATM i need to use Object.freeze, and wanted to see which browsers (if any) supported that yet. ...

Why was ECMAScript 4th edition completely scrapped?

I've been looking for some information regarding the scrapped ECMAScript 4th Edition without much success, even on SO. I know Mozilla's JavaScript 1.7 implemented many (all?) of the new features offered in 4th Edition and I thought I remembered a good John Resig post on it but I can't seem to find it on his blog now. In particularly, I...

In ECMAScript5, what's the scope of "use strict"?

What scope does the strict mode pragma have in ECMAScript5? "use strict"; I'd like to do this (mainly because JSLint doesn't complain about it): "use strict"; (function () { // my stuff here... }()); But I'm not sure if that would break other code or not. I know that I can do this, which will scope the pragma to the function... ...

How to run javascript in ECMA 5th edition strict mode?

Possible Duplicate: Javascript: use strict Is there any way to know how and which browsers support it? ...

Why were namespaces removed from ECMAScript consideration?

Namespaces were once a consideration for ECMAScript (the old ECMAScript 4) but were taken out. As Brendan Eich says in this message: One of the use-cases for namespaces in ES4 was early binding (use namespace intrinsic), both for performance and for programmer comprehension -- no chance of runtime name binding disagreei...

JavaScript types

Hi, As per http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf, JavaScript has 6 types: undefined, null, boolean, string, number and object. var und; console.log(typeof und); // <-- undefined var n = null; console.log(typeof n); // <--- **object**! var b = true; console.log(typeof b); // <-- boolean var str = "...

translating Ecmascript (Java,javascript,Actionscript) knowledge to Objective C

Hi Newcomer to Objective C and trying to translate concepts and sytax I know from ecmascript based languages to Objective C. Is it proper to think of the .h header file in ObjectiveC as an Interface in Actionscript? Lets take the following code example in Objective C which calls a method containing 2 arguments [myTextObject setString:...

Confused with ECMAScript Language Specification Function Calls section

Hi, I am reading ECMAScript Language Specification Function Calls section Can someone rephrase or detailed explains the following sentense for me? The production CallExpression : MemberExpression Arguments is evaluated as follows: Evaluate MemberExpression. let's take this code as an example. var john = { name:...

Why is there a large difference in readability between the C# and ECMAScript specifications?

I have been studying the ECMAScript specification and have found that it is extremely hard to read and understand. I constantly have to backtrack to keep concepts in my head. When reading the C# specification I am able to study components of the language without constantly moving around the document. ECMAScript Specification C# Specifi...

from ObjectiveC to ECMAscript

Going thru the excellent Apress books on Objective C. To help in my undertanding, I try and recode any Ojective C code samples in Java/Action-script. One common structure in method calls in ObjC leaves me a bit puzzled. -(id) initWithPressure: (float) pressure treadDepth: (float) treadDepth; (in ECMAscript)Would this be most sim...

I need help translating this portion of the ECMAScript grammar?

I've been working on my own implementation of ECMAScript for quite some time now. I have basically done everything by hand to help gain a deep understanding of the process. Repeated attempts to analyze and understand this portion of the grammar have failed so I've been working on other portions of the project but now I am at a point were...

How can I improve the recursion capabilities of my ECMAScript implementation?

After some resent tests I have found my implementation cannot handle very much recursion. Although after I ran a few tests in Firefox I found that this may be more common than I originally thought. I believe the basic problem is that my implementation requires 3 calls to make a function call. The first call is made to a method named Call...

Javascript IN operator compatibility

Hi Folks, Can someone tell me since which ECMA version the IN operator is available and which browsers (versions) support it ? Explanation: The IN-operator can be used like the following: var myObject = { Firstname: 'Foo', Lastname: 'Bar' }; if('Lastname' in myObject){ // Lastname is an attribute of myObject } ...

How can I effectively test a scripting engine?

I have been working on an ECMAScript implementation and I am currently working on polishing up the project. As a part of this, I have been writing tests like the following: [TestMethod] public void ArrayReduceTest() { var engine = new Engine(); var request = new ExecScriptRequest(@" var a = [1, 2, 3, 4, 5]; a.red...

Why is the Alternative symbol of the ECMAScript RegExp grammar left recursive?

I cannot for the life of me figure out why Alternative is left recursive. It really throws a wrench into my parser. Alternative :: [empty] Alternative Term Here is a note in the semantics portion of the spec that is not exactly clear. Maybe the reasoning would be revealed once I understand this? NOTE Consecutive Terms ...

Many names of JavaScript / ECMA

I was looking up newer functions of JavaScript and found ECMAScript/ECMA 5. Because I had never heard of it I looked in to it more and found that it comes in the form of different names such as: JavaScript, JScript (Microsofts Variation), ECMAScript, ECMA 5, E4X (JavaScript for Xml)and many others From what I have read it seems that ...

How can I optimize my implementation of the "toExponential" algorithm to improve precision?

I feel like my implementation is a bit naive. Take notice of the variables min in max which have a rather small precision of +/- 0.0001. If I raise the precision any further the code is just too slow. Algorithm Code private IDynamic ToExponential(Engine engine, Args args) { var x = engine.Context.ThisBinding.ToNumberPrimitive()...

Why does "dtoa.c" contain so much code?

I'll be the first to admit that my overall knowledge of low level programming is a bit sparse. I understand many of the core concepts but I do not use them on a regular basis. That being said I was absolutely astounded at how much code was needed for dtoa.c. For the past couple months I have been working on an ECMAScript implementation...

How is a NullLiteral represented in tree form?

According to the ECMAScript specification in section 7.8.1 a NullLiteral is defined as follows: NullLiteral :: null What I am trying to understand is how this is represented in tree form when a NullLiteral is included in the following productions found in sections 7.6.1 and 7.8. ReservedWord :: Keyword FutureReserved...

IDE for ECMAScript-262 with in IDE execution / debugging for node.js/V8

I currently use Eclipse as my IDE for other languages and I'm rather used to not having to leave the IDE for anything - however I'm really struggling to find the same or a similar setup for pure ECMAScript-262. To clarify, I am not looking for DOM support, jquery, HTML or anything like that, preferably just an IDE with ECMAScript-262 su...