In a world where most code in modern programming languages will be machine-generated, what is the role of an upper-level programming languages course?

Interesting and non-obvious answers please.

@shriramk accepting the premise as true : why choose any particular level to generate ? why not generate binaries or asm or llvm ir or c or js or ts without jsx or…. i think it is a question that might bear on the answer but not an answer in and of itself
@wingo I don't spend any cycles worrying about the assembly language that my compilers generate, but that's because my compilers are deterministic and not flaky. Now we have compilers (like Claude) that are neither. So now I seem forced to get my hands dirty in a way that I was pretty much universally insulated from for decades.

@shriramk oh sure. but specifically for claude: there is the non deterministic, « meaningless » « compiler » (the llm), which generates a program in a language with a defined semantics : why choose any particular semantics / set of abstractions, is my question.

maybe you are saying « choose the one that is most easy for me to read / understand ». i don’t have a well thought out answer, myself

@wingo Ah, I see.

I'm not sure I entirely buy the "meaningless compiler" part. @arjun 's talk at Jane Street, for instance, suggests they aren't quite as meaningless as we want to think…

@shriramk @arjun haven’t seen that talk and would like to! still perhaps your point on errors on bsky is most pertinent, maybe the important part is the PL sets the global invariants and the LLM explores solutions in that space; a given set of invariants might be more productive or have some security properties, etc. am enjoying the thought exercise!

@wingo @shriramk There is a very large class of programmers who can ignore assembly language. But, that has never been the case for most programmers writing performance-critical code. For example, see the recently published Anthropic performance engineering exam, which involves writing code for a made-up VLIW simulator.

The question now is, what is the growing class of tasks we can do entirely in natural language? Also, why does it matter if the natural language produces computer programs to do the task, or if the model/agent "just does it" itself.

Unrelated talk here: https://www.youtube.com/watch?v=ahtbcExEKng

Arjun Guha: How Language Models Model Programming Languages & How Programmers Model Language Models

YouTube
@wingo @shriramk related thought. At this time, platforms like Replit and Claude Code on the web show you the code. It’s not hard to imagine a future where they don’t. The code is the true output that can be distilled. They may conclude that it needs to be secret the same way that training data and model weights are secret. So all you may see is some webassembly blob or streaming video.
@arjun
Interesting. Seems unlikely for a while to come, due to the various ways in which the generated code may not match intent. Also, company DNA matters some. Microsoft has always been dev-friendly, so if devs want to see code (which they will, at least as a comfort food), MS will make tools that expose code to differentiate themselves in the market.
@wingo

@shriramk @arjun @wingo Aside: I still write programs in domains where I care about the machine code that comes out the other end.

To the main point: I think we want the generated intermediate representation to be maximally human comprehensible given that people using LLMs will be spending so much time reviewing and debugging…

@arjun @wingo @shriramk I think the set of things where models can do it as accurately and as efficiently themselves as with a program will continue to be pretty small -- the same thing is true for humans!