yujiri.xyz

Software

Interpretation is a sin

I think that compilation is better than interpretation for almost all use cases - that is to say, almost all software should be written in a compiled language. The main reason I think this is because interpretation is dynamic linking.

There are a few articles against dynamic linking that have helped me form this opinion:

cat-v

whoever this person is

Drew DeVault

In summary, the benefits of dynamic linking are way over-hyped and don't actually justify the massive complexity of having libraries installed separately, locating them at runtime, worrying about library vesions and conflicts...

And interpretation is just pretty much the same thing, but at the API level instead of the ABI level. When you install a program in an interpreted language it dumps dependencies into shared locations on your system. Ever tried running your system's command to list all the packages you have installed? There's a bunch you have no idea about, right? (Maybe not if you know a lot more than me.) I'm pretty sure the only Python apps I have on my system are electrum and youtube-dl and pacman shows 39 python packages installed besides the interpreter.

electrum

youtube-dl

I don't deny interpretation offers some conveniences, like not having to distribute different application builds for different targets, the possibility of interactive use, and no risk of forgetting to rebuild after a change and testing the old binary and wondering why your changes didn't take effect.

But the benefit of being able to ship a program as *just* the program and not a bundle of all dependencies is a huge deal to me. Dependencies are an implementation detail and ought to be encapsulated within the program, not leak out into the rest of the system.

There's also the fact that compilation has a fundamental advantage when it comes to resource use, and that's also important to me. I don't believe our software should be getting more resource-hungry at the same pace as hardware is getting more powerful. It's enlightening to look back at old software: I recently installed Windows 98 in qemu on a 1GB disk and it gave me a dialog that was like "Hey, you have a disk bigger than 512MB! How unusual! Want to enable some special large disk support?". 😄. Now my /bin is 1.4GB. How the shit did this happen?

contact

subscribe via RSS

Proxied content from gemini://yujiri.xyz/software/compile.gmi

Gemini request details:

Original URL
gemini://yujiri.xyz/software/compile.gmi
Status code
Success
Meta
text/gemini; lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.

What is Gemini?