Hacker News new | ask | show | jobs
by jp57 362 days ago
Programming languages researchers and designers labor under the mistaken assumption that programming practitioners--people who are writing programs to solve problems--actually want "a language with a syntax and semantics tailored for a specific domain", or any really fancy language features at all.

I say this from the perspective of someone who nearly became a PL researcher myself. I could easily have decided to study programming languages for my PhD. Back then I was delighted by learning about cool new languages and language features.

But I did didn't study PL but rather ML, and then I went into industry and became a programming practitioner, rather than a PL researcher. I don't want a custom-designed ML programming language. I want a simple general-purpose language with good libraries that lets me quickly build the things I need to build. (coughPythoncoughcough)

Now that I have reached an age where I am aware of the finiteness of my time left in this universe, my reaction when I encounter cool new languages and language features now my is to wonder if they will be worth learning. Will the promised productivity gains allow me to recoup the cost of the time spent learning. My usual assessment is "probably not" (although now and then something worthwhile does come along).

I think that there is a very real chance that the idea of specialized programming languages will indeed disappear in the LLM era, as well as the need for various "ergonomic" features of general purpose languages that exist only to make it possible to express complex things in fewer lines of code. Will any of that be needed if the LLM can just write the code with what it has?

5 comments

30 lines are always going to be easier to read/write/debug than 3000 lines, so it'll probably remain easier (for both humans and machines) to write correct code in languages that make it possible to express ideas concisely and elegantly.
From elsewhere on the front page: "given choice between complexity or one on one against t-rex, grug take t-rex: at least grug see t-rex".
So you write everything in assembly then?
That is a false dichotomy. It is not 3000 versus 30. It's 3000 versus 2578 where the DSL is poorly documented by someone who long ago lost interest in maintaining it. I prefer the initial example in the article to the DSL equivalent. I can immediately read the non-DSL code and be productive. The DSL looks like a vanity project.
> Will the promised productivity gains allow me to recoup the cost of the time spent learning.

Some deep PL stuff I doubt there is productivity gain to begin with. But many ideas in the ML language family are simple and reduce debugging pain. Time lost from one encounter with muddy JS/Python semantics is more than the time learning about sum types.

Do you have any opinions on elixir? Have you played around with reasonML?
Haven't played with either. I don't think OCaml needs a new syntax. Maybe Reason need it for JSX but I don't really do frontend.
neither of those have a realistic payoff in the real world. talking money coming into an account in exchange for jira points available. It's different in SV but elsewhere in the world it's not a realistic proposition.
That sounds grim, but not implausible. Domain-specific languages seemed like a significant improvement over general-purpose languages plus libraries. But now that we have a tool that lets you make Jazz Hands at your computer and have it spit out something that does most of what you want, do they really help?

Maybe some boring, kind-of-consistent language like C, Python, or Go is good enough. An LLM spits out a pile of code in one or more of them that does most of what you want, and you can fix it because it's less opaque than assembly. It doesn't sound like a job I'd want, but maybe that's just the way things will go.

Hmm. Go was written to be easier for junior developers to use, and to be maintainable "in the large".

I wonder if we need a language designed to be easier for an AI to reason about, or easier for a human to see the AI's mistakes.

I think in 5 years you are absolutely right, but for now we desperately need a language which is easy for ai and easy for humans. The stuff that AI has suggested to me is about 50% genius in about 50% idiocy. I don't know what that language is, if I could pick it personally, I would pick elixir, but I recognize that we're probably looking at typescript or something like that
I totally see "read-only" language emerging in the future. A language that is never written by humans yet has unambiguous syntax and semantics.
Embedded DSLs (e.g. PyTorch) have been hugely successful in the field of machine learning, so I think there is a bit of nuance here that you're not considering.

I also take issue with the idea that Python is simple. Python's semantics are anything but. The biggest issue the language has, performance, is a consequence of these poorly thought out semantics. If the language was actually simple it would be a lot easier to build a faster implementation.

I teach beginner Python classes. If the semantics were so horribly convoluted we wouldn't be teaching it to beginners.