返回资讯中心
外部精选
软件工程
#开发者实时流

My Desert Island Languages

You're on a deserted, uninhabited island, with no internet but with a functioning laptop. You can only take 3 programming languages with you, what do you do?

Hacker News 最新nchagnet2026/10/30 · 19 天前21 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

You're on a deserted, uninhabited island, with no internet but with a functioning laptop. You can only take 3 programming languages with you, what do you do? This totally realistic scenario is a little challenge I gave myself to evaluate what I like in a programming language, what features I want, what I definitely don't want, and what I'd use it for.

Since I don't like when articles take too long to answer their own premise, here are my picks:

There, with this out of the way, the rest of the article will essentially be a rant semi-rigorous analysis of all contenders I considered. But before that, let me start with some disclaimers. Taste in programming languages is very personal and, like everything in tech culture, very divisive. This post is not meant to be an attack on your favourite language, my tastes and choices are not a commentary on yours, and to cement that fact let me disclose that I know shockingly little about the theory of programming languages. If I met the perfect language in the street, I wouldn't even know. I'm a hobbyist, so my key criteria here are:

This category is for the languages you can pretty much do anything with,1 from systems engineering to web development (frontend/backend) including data treatment, app creation, you name it. This is where the C++, Java, Go, Rust, TypeScript/JavaScript and Python of this world belong.

As I mentioned above, I chose Rust, and I already expanded in great detail what I love about it, so I'll keep this section rather short. There is a lot of hype about Rust, a lot of deserved frustration with how it's been shoved everywhere, every project needs to say "made with Rust" as a marketing ploy and somehow everything needs to be rewritten in Rust.

To be honest, the usual arguments used to sell Rust aren't really big factors for me. Yes memory safety is nice, but Go has shown garbage collection isn't a barrier to performance. Mostly, I enjoy how Rust mixes some key aspects of functional programming while keeping the "get things done" attitude of the C line of languages. Algebraic Data Types, error handling, options, iterators, these are all features I can hardly live without anymore.

Contenders for this position are also the most popular languages, those which can actually get you employed. In no particular order,

Some other languages I haven't tested yet but of which I obviously have preconceived opinions:

I'm keeping the higher-level languages for the next section, but TypeScript/JavaScript and Python could have also featured in this list.

Even if you are obsessed with Rust or C++, you probably don't want to reach for it for everything. When building a simple HTTP server or a basic CLI app, you don't always need to worry about memory management, or optimize data structures to the last byte. In Rust, this usually means adding .clone() everywhere and wrapping everything in Arc to avoid all the borrow checker inflexibility, but sometimes enough is enough and you should reach out for a more adapted language.

In this section, the size and quality of the ecosystem takes on a bigger role (no one wants to rewrite an HTTP server from scratch in Python). The logical choices here are

So I chose Gleam, the new kid on the block of functional programming. I learnt OCaml at university, and worked a lot with the Wolfram language during my PhD, so I feel at home with Gleam. Gleam was literally built to make functional programming more accessible, and it does it wonderfully. I don't have the patience to dig into Haskell yet (perhaps I will one day), but with Gleam I can scratch that itch without popping a blood vessel. The Erlang runtime is also a great selling point. I don't pretend to fully understand why yet, but as with the JVM, the runtime manages a lot of the unpleasantness so you can have a performant language without having to micromanage it. A cool thing about Gleam is it compiles to both the BEAM/Erlang VM, but also to JavaScript (I know...) so you can do frontend/backend in one language. That's just cool.

I also wanted to consider the Wolfram language, but where do I even start. It's a proprietary language, it's pretty much fully tied to the ridiculously expensive Mathematica ecosystem and it has some very weird quirks when it comes to "all-purpose" programming. But for science and math, it's absolutely peerless. I've tried SymPy, SageMath, everything I could find, but Mathematica's approach remains, in my humble opinion, the best (and the fastest!).

If we zoom out from FP, there are plenty of languages in this space which I passed on:

For my final language, I wanted something not too redundant with the previous two, with which you can already pretty much do whatever you want. So I thought a scripting language is what I'd be missing.

In that space, the very obvious choice is bash (or really any POSIX-compliant shell). It's everywhere, everyone knows some of it, "when you ssh somewhere it's there" (I see that argument all the time but I never relate, I don't live on remote hosts.) The problem with bash is that it's a pure nightmare to write anything longer than 10 lines in it. Conditionals, loops, variables, everything is so ridiculously complex. I've written my fair share of it and I still routinely have to check a cheatsheet for basic language features.

That's why I picked Lua! It's a very well-known, very popular scripting language which I must shamefully admit I only discovered recently. I was aware of its existence (I had a brief Neovim period) but I didn't realize how amazing it was until I started using the agent harness Maki (rest easy, my only mention of LLMs today) whose plugin system is Neovim-inspired and therefore also in Lua.

I like it, it's so easy to read, yet so powerful and so lightweight. You can embed it pretty much anywhere, in any language, it's quite performant thanks to LuaJIT and you can even use it for your shell scripts!

There are a few other candidates in that space:

Honorable mention to Fish, which I use as my main shell and which I've enjoyed using to write functions and scripts. It's like a sane bash (but not POSIX compliant), you can't hate it really. Probably my second choice, just not that exciting compared to Lua I guess.

I limited myself to 3 when it comes to the "programming" languages of this world, but there are plenty of other choices we can argue about if we extend the definition of languages.

It's undeniable that when it comes to queries, SQL has won. It's everywhere, it's the standard, we should just rename it "ISO-SQL" and be done with it.2 But my personal favourite is indubitably PRQL. It's mostly useful for analytical queries, which is what I work with every day, and brings the beauty of pipes to data operations in SQL. If you don't know it, try it immediately!

I spent two hours the other day reading arguments about configuration languages. Here I'm on purpose not considering the serialization/deserialization part of the question (I don't care what the machine feels like when reading JSON, I care what I feel like writing JSON.)

I never really hated YAML that much (at least since the worst of it has been patched), so I was fine with it for a while. Especially compared to JSON which is just awful to edit by hand. But working with Helm has depressed me beyond words, and now I can say I hate declarative-YAML setups (looking at you GitHub Actions). At this point, just use a DSL...

When it comes to configurations, I think TOML hits the sweet spot, except that like many others I find the [table] v. [[table]] dichotomy confusing (I always have to check which one's for what).

If you've read this far, congratulations. You'll probably have noticed I don't have many strong arguments for one language or another. Like I said before, this is all deeply personal, and the dirty little secret here is that every single language I mentioned on this page is still good at what it does and there is always someone, somewhere, who's using them with great satisfaction. So I'm not going to pretend there is a universal choice, these are just mine.

What this little exercise did was teach me what I like and what I don't like in a programming language:

So, what are your deserted island languages?

Some people may argue that with enough motivation, you can probably do anything with any Turing-complete language. That'd be true, but just because you can doesn't necessarily mean you should. At least, I probably won't. ↩︎

But which flavor will it be... ↩︎

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →