JavaScript Module System: Exploring the Design Space

Cited 0 time in webofscience Cited 0 time in scopus
  • Hit : 288
  • Download : 1337
While JavaScript is one of the most widely used programming languages not only for web applications but also for large projects, it does not provide a language-level module system. JavaScript developers have used the module pattern to avoid name conflicts by themselves, but the prevalent uses of multiple libraries and even multiple versions of a single library in one application complicate maintenance of namespace. The next release of the JavaScript language specification will support a module system, but the module proposal in prose does not clearly describe its semantics. Several tools attempt to support the new features in the next release of JavaScript by translating them into the current JavaScript, but their module semantics do not faithfully implement the proposal. In this paper, we identify some of the design issues in the JavaScript module system. We describe ambiguous or undefined semantics of the module system with concrete examples, show how the existing tools support them in a crude way, and discuss reasonable choices for the design issues. We specify the formal semantics of the module system, which provides unambiguous description of the design choices, and we provide its implementation as a source-to-source transformation from JavaScript with modules to the plain JavaScript that the current JavaScript engines can evaluate.
Publisher
Association for Computing Machinery
Issue Date
2014-04-24
Language
English
Citation

13th International Conference on Modularity, MODULARITY 2014 (Formerly AOSD), pp.229 - 240

DOI
10.1145/2577080.2577088
URI
http://hdl.handle.net/10203/190514
Appears in Collection
CS-Conference Papers(학술회의논문)
Files in This Item

qr_code

  • mendeley

    citeulike


rss_1.0 rss_2.0 atom_1.0