import.meta and TC39 process as a whole
matthewwrobb at gmail.com
Sat Aug 5 16:01:34 UTC 2017
Can anyone knowledgeable on the topic of direct vs indirect evaluation
chime in with an explanation or a link to one as my understanding is enough
to "get it" but not too really explain it.
On Aug 5, 2017 11:57 AM, "Dmitrii Dimandt" <dmitrii at dmitriid.com> wrote:
> Exactly! import.meta doesn’t make import an object. new.target doesn’t
> make new an object. function.sent doesn’t make function an object.
> These are just purely arbitrary things tacked on top of randomly selected
> keywords because at one point someone needed some *introspection* info
> (such as “current execution context” etc.). Instead of designing a proper
> introspection API (or even the beginnings of it), we now have:
> - keywords that are just keywords, really (typeof, case, break, etc.)
> - keywords that are just keywords, but don’t even exist in a language.
> They are reserved for future use in various contexts: always reserved, only
> in strict mode, only in module code etc. (enum, public, private, await
> etc.). May never be used and may possibly be removed, as some keywords have
> been (int, byte, char etc.)
> - literals that are basically keywords (null, true, false)
> - non-keywords that are for all intents and purposes keywords (eval,
> - keywords that look like objects (because they have additional
> properties) which are not objects (new with new.target)
> - keywords that look like functions (because they are invoked like
> functions and return values like functions) which are not functions (import)
> - keywords that look like objects *and* functions but are neither (import)
> The last three are now the current fashionable trend in TC39 for some
> reason. Why?
> On Sat, 05 Aug 2017 at 15:40 "T.J. Crowder" <">"T.J. Crowder" > wrote:
>> On Sat, Aug 5, 2017 at 2:35 PM, Naveen Chawla <naveen.chwl at gmail.com>
>> > Thanks for the link! That means that `import` is already on the
>> borderline of the spec since it wants to be a function and object.
>> No, not at all. It's a keyword. `import.meta` doesn't make `import` an
>> object, any more than `new.target` makes `new` an object.
>> -- T.J. Crowder
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss