Extension Languages

Found this old post by Jon Skinner on why SublimeText went with Python.

If you’re building an application, then your users will get much more out of it if you given them a plugin API. For Sublime Text, I settled on Python as the extension language. In fact, I think you’d be mad to choose anything else.

It’s well-reasoned, and considers all the alternatives at that time.

What about JavaScript? It’s an underrated, elegant language, with a huge number of people acquainted with its syntax. Its weakness is that it’s not used as a general purpose language, so there’s no selection of libraries your users will be able to build on. No libraries and no built-in standard APIs (file system access, I’m looking at you) rule JavaScript out.

However, it’s also clear how, 14 years later, the landscape favors JS/TS as the scripting language for an editor/IDE like VSCode.

Lua is another candidate, which has a lot of uptake in games. It has a very small code footprint, and excellent runtime speed. However, its paucity of libraries, weak Unicode support, and small-medium user base make it hard to justify as an extension language for desktop applications.

Ditto for Lua in Neovim today.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s