Language Size (was Re: [TLUG]: ECMAScript ("Javascript") Version 4 - FALSE ALARM)

Jeff Dyer jodyer at adobe.com
Tue Oct 30 13:46:07 PDT 2007




On 10/30/07 1:23 PM, Maciej Stachowiak wrote:

> 
> On Oct 30, 2007, at 1:01 PM, Chris Pine wrote:
> 
>> Maciej Stachowiak wrote:
>> 
>>> Can anyone address feasibility of a small full implementation
>>> (source  code all the way to execution)?
>> 
>> If we didn't think it was feasible, we wouldn't be here.  :)  While
>> we don't have a full implementation yet (no one does), progress is
>> looking good.  Our latest engine, just out in Opera 9.5 beta, is
>> both smaller and considerably faster than our previous engine (which
>> we've shipped on many small devices).  It runs on devices smaller
>> than an iPhone, no problem.  (How much ram does an iPhone have?  I
>> don't see that on Apple's site.)
> 
> Does your latest shipping engine implement parts of ES4? If so, how
> much?
> 
> By the way, I think the discussions about language size could benefit
> from some quantitative data. I think the following comparisons would
> be interesting:
> 
> 1) Size of the ES4 grammar relative to the ES3 grammar (say, by count
> of productions).
> 
> 2) Size of the ES4 standard library by count of classes, methods and
> properties.
> 
> I am willing to run the number on these if someone can help me find
> the grammar and some sort of standard library index in the spec.

The grammar is posted at:

  http://ecmacript.org/es4/spec/grammar.pdf

The builtin's are described in the a draft library spec in the monotone
repository (./spec/library.pdf), which you should have access to.

Another interesting comparison is between ES3 and ES4 asts. There is a lot
of syntactic sugar that get boiled out during parsing of ES4 programs. In
fact, the same parse routines can be reused for different productions of the
surface grammar. Compare the value syntax for objects and type syntax for
record types, for example.

I'm happy to help put either document in a format that is easier to analyze.

Jd

> Regards,
> Maciej
> 
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss




More information about the Es4-discuss mailing list