How widely used are the JavaScript "import" and "export" statements?

D

David Karr

I was reviewing an introductory JavaScript manuscript today, and I
noticed a reference to the "import" and "export" statements, which I
had never even noticed before. I see that they are not supported in
IE, and not in ECMAScript, either. Has anyone ever used these
statements for anything useful?
 
T

Thomas 'PointedEars' Lahn

David said:
I was reviewing an introductory JavaScript manuscript today, and I
noticed a reference to the "import" and "export" statements, which I
had never even noticed before. I see that they are not supported in
IE, and not in ECMAScript, either. Has anyone ever used these
statements for anything useful?

There are no such statements.


PointedEars
 
D

David Karr

JavaScript has a large number of reserved words, most of which are
unused.  The words 'import' and 'export' are in this list.

The following page in the Mozilla DevCenter documents it: <https://
developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/
import>.

I also found it mentioned here: <http://www.devguru.com/Technologies/
Ecmascript/Quickref/import.html> . This page is odd, as it claims to
document EMCA-262, but other pages say it's not in ECMAScript.
Perhaps it was present at one time, and was removed?

It's also mentioned here: <http://docs.sun.com/source/816-6408-10/
stmt.htm>.
 
T

Thomas 'PointedEars' Lahn

David said:
The following page in the Mozilla DevCenter documents it: <https://
developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/
import>.

Interesting; the Matrix has you. However, as you observe, the import/export
feature is related to signed scripts only. That is probably the reason why
they are so seldom used.
I also found it mentioned here: <http://www.devguru.com/Technologies/
Ecmascript/Quickref/import.html> . This page is odd, as it claims to
document EMCA-262, but other pages say it's not in ECMAScript.
Perhaps it was present at one time, and was removed?

It has never been part of any edition of _ECMA_-262. One of many mistakes
there (since when is \\ an operator?). Remove that bookmark.
It's also mentioned here: <http://docs.sun.com/source/816-6408-10/
stmt.htm>.

ACK


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top