I'm trying to better understand the concepts of static and dynamic linking, in terms of the ways JavaScript libraries are used in modular systems.

Does it ever make sense to describe a JavaScript library run in a browser as "linked" in a technical sense, the way you would a C++ library?

For instance, in these examples:

  • a JavaScript library is included directly in html with a tag
  • a JavaScript library is imported using a module system like RequireJS or Node.js via npm
  • a JavaScript library is bundled using Webpack or Browserify

Could any of these situations count as either static or dynamic linking, either in the context of another JavaScript library or in terms of the browser as the "executable"?

Put another way (thanks @Gilles): is there a concept unifying what is called linking in typical C++ programs and these various ways of referencing and combining JavaScript?

  • 3
    $\begingroup$ If you're asking about usage of the word "linked", this sounds like a matter of opinion to me and not a technical question about computer science. Do you have a specific technical question about the properties of this? What are your thoughts? What would you do with the answer? What problem are you facing, and how would the answer help you solve it? $\endgroup$ – D.W. Mar 21 '18 at 21:44
  • $\begingroup$ @D.W. I don't have a specific technical problem, just a conceptual one. If it's not appropriate to the venue I can delete it. By your comment I gather there really isn't a specific technical definition of library linking, is this accurate? $\endgroup$ – meetar Mar 21 '18 at 22:29
  • 1
    $\begingroup$ @D.W. This does seem like a scientific question to me: is there a concept unifying what is called linking in typical C++ programs, and these various ways of bundling JavaScript code into programs? $\endgroup$ – Gilles 'SO- stop being evil' Mar 21 '18 at 22:33
  • $\begingroup$ @Gilles, Cool, that sounds like a useful way to interpret this. Thanks. $\endgroup$ – D.W. Mar 21 '18 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.