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

Lars Hansen lhansen at adobe.com
Wed Oct 31 05:42:47 PDT 2007


The intrinsic names are for early binding.  Since the prototypes are
mutable nothing is known about their properties.  So code that wishes to
early-bind to methods would annotate its variables and open the
intrinsic namespace to give preference to intrinsic methods over
prototype methods.  The benefits are performance, known semantics, and
static type checking (in strict mode).
 
And you are right, they are not interestingly different: they have type
annotations.  (Usually, the prototype method calls the intrinsic method
after performing type conversions mandated by ES3.  There are a few
wrinkles here and there but nothing important.)
 
--lars


________________________________

	From: es4-discuss-bounces at mozilla.org
[mailto:es4-discuss-bounces at mozilla.org] On Behalf Of Maciej Stachowiak
	Sent: 31. oktober 2007 12:45
	To: Yehuda Katz
	Cc: es4-discuss at mozilla.org
	Subject: Re: Language Size (was Re: [TLUG]: ECMAScript
("Javascript") Version4 -FALSE ALARM)
	
	

	On Oct 31, 2007, at 4:28 AM, Yehuda Katz wrote:




		---------- Forwarded message ----------
		From: Yehuda Katz <wycats at gmail.com>
		Date: Oct 31, 2007 3:58 AM
		Subject: Re: Language Size (was Re: [TLUG]: ECMAScript
("Javascript") Version 4 -FALSE ALARM)
		To: Lars Hansen <lhansen at adobe.com>
		
		A massive chunk of these are the duplicate methods in
the intrinsic namespace. If you remove those, you actually have very few
new classes or methods (see below). Another big chunk is getters and
setters that represent old ES3 methods pre-getters and setters. 

		 
		Specifically, removing the duplicate intrinsic methods
(but not removing replacing getters/setters, etc.), there are 256 new
items on this list, vs. 276 old methods. Hardly "bloated".


	That doesn't exactly match my count, but close enough. For ES4 I
removed all duplicate intrinsic:: names (not sure what these are for but
I'll trust that they are not interestingly different), one of the two
String classes, and meta::invoke. For ES3 I did not count [[Call]]
internal properties or the like. I get:

	ES3: 220
	ES4: 437

	Seems to be about the same ~2x increase that you report, though
we used different methodologies to count. I would not count this as
excessive growth, when it comes to the standard library.

	Regards,
	Maciej


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20071031/2145e107/attachment-0002.html 


More information about the Es4-discuss mailing list