When macros will get in, will the core get slimmed in favour of macro-definitions?

C. Scott Ananian ecmascript at cscott.net
Mon Jun 22 02:32:22 UTC 2015

I think you will note that many of the "built in" methods in the spec are
already implemented in JavaScript code in many implementations (v8,
firefox).   Similarly the ability to implement more fundamental features in
terms of macro definitions may well be pursued by the implementations.  But
note that the spec does not *mandate* that these built-ins are defined
'natively' in JavaScript (the spec does not use JavaScript to define the
required behavior), and I would expect that macros would be treated
similarly: that is, the spec definitions will not be written as
applications of macros, but implementations are free to use macros to
implement them were appropriate.

I would certainly expect a macro proposal to be evaluated more favorably if
it were powerful enough to allow some implementation refactoring of this
sort.  And in fact, I wouldn't be surprised for a successful macro proposal
to have been prototyped in the implementation of one of the major engines.

This is not an official position, of course.  But I believe you can use
history as a guide.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150621/a0147361/attachment.html>

More information about the es-discuss mailing list