obsoleting the "new" keyword

Juriy Zaytsev kangax at gmail.com
Wed Jan 14 11:58:36 PST 2009


On Jan 14, 2009, at 1:51 PM, Peter Michaux wrote:

[...]

> Yes.
>
> Needing "new" makes some things unnecessarily bulky.
>
> var pts = getRows().map(function(r) {return new Point(r);});
>
> verses just
>
> var pts = getRows().map(Point);

This is indeed a frequent annoyance.

It wouldn't be so bad if there was `Function.prototype.construct` or  
`Function.prototype.new` (or something along these lines).

Are there any plans to include such facility in ES3.1 (or any  
objections against it?)

[...]

-- 
Juriy Zaytsev
Co-founder, BitSonnet, Corp.
Core developer, Prototype.js
kangax at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090114/92834ca2/attachment.html>


More information about the Es-discuss mailing list