this post was submitted on 22 Sep 2023
26 points (90.6% liked)

Programming

17417 readers
81 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

I mean, sure, that's probably heavily influenced by the need for bundling for the frontend.

But it isn't done blindly. Bundlers reduce the overall size of the code, either due to minification or tree-shaking (removing unused modules). It also removes the filesystem overhead of resolving and opening other modules.

Would bundling be useful in other interpreted languages?

I suppose you may count JVM's compilation to bytecode as being very similar.

you are viewing a single comment's thread
view the rest of the comments
[–] Knusper@feddit.de 11 points 1 year ago

Lots of people consider it an advantage, that interpreted languages don't require a separate compilation/bundling step. Most shell scripts or Python scripts, you can just grab the code for and run them.

But yeah, for anything more complex, you need libraries and you likely want to distribute additional files, like documentation or web content files, or you may even want to just hand out the runtime to the user, so that you don't run into breaking changes between Python versions, for example. For all of these, a bundling step in some form is necessary.

You can also, for example, pre-compile Python, to try to mitigate its slow execution speed...