Live data from Hacker News

Why care about programming languages

ebellani.github.io

41–50 of 70 posts

Re: Why care about programming languages

#42
> In the AI age, understanding these concepts becomes more important, not less—they are what separate those who merely prompt from those who truly engineer.

But doesn't that sound like cope? It's like an old ASM programmer telling himself that his obscure assembly knowledge will surely still give him great advantages as he is forced to switch to React.js development.

Re: Why care about programming languages

#43
post #8

There's a lot that's worth thinking about and discussing on this topic, but it's too loaded with emotional stuff for many people to hope for a productive discussion. I'm a programming languages nerd. I was paid to program in over 20 different languages over my 25 year career. I read up on many more languages along the way, and I wrote pet projects in a few of those. I've written a couple assemblers, compilers, and in…

As a side note, I previously commented somewhere else that, if a language has a terse way and a verbose way to do the same thing, preferring the terse way might be more economical because it saves bunch of tokens for the LLM. But for humans to review the code, we may need some mechanism to translate the code from terse way to the verbose way, if the human has a hard time understanding the terse code.

> If you were starting a business for a great software idea, with your own savings on the line, would you hire 10 AI hostile programmers to implement the idea or 2 AI friendly people and get them some subscriptions to the top models? Remember: if it doesn't come together, it's YOUR money on the line.

I know quite a few non-technical people that started vibe-coding this year and got good results for their ideas. What language did they use? They just asked the AI what language or tool would be best for the idea, then followed the AI's suggestions. All the setup, configuration etc. were done by the AI. They learned a bunch of things along the way, but their main focus is still on the big picture idea, not the technical details. After the project is done, they are still not technical experts, but at least they have something to run with in the real world.

Re: Why care about programming languages

#44
post #15

Can't remember who said it, but I think the most poignant commentary about the prospects of LLMs completely replacing humans is the simple observation that yes, you can delegate many if not all of your tasks requiring thinking to LLMs, but it is inherently impossible to delegate the task of understanding . If you hope to write an efficient prompt which gives you what you think you want, you need to actually understan…

> would you rather review LLM-written assembly or LLM-written Haskell? I wish we had a language that was targeted specifically for LLMs to write and humans and LLMs to inspect: - Simple robust syntax - One obvious way to do things - Static type checking - Purely functional encouraged, escape hatches for performance - Inspect-able, testable, and reviewable in small pieces - Something like formal predicates, preconditi…

I always find it amazing that they can produce syntactically valid Python code —which is basically Whitespace with some syntactic sugar— most of the time while being utterly unable to count the rs in strawberry.

Re: Why care about programming languages

#45
post #16

Earlier quoted context omitted.

There's very little evidence, if any, to suggest that slop is actually "good enough". I have interacted with multiple apps that clearly were written using AI by people who did not actually spend the time understanding what was made, and it most certainly was not an experience that I would classify as "good enough". I know this may be some kind of reverse survivorship bias and that I simply do not notice all of the sl…

> I have interacted with multiple apps that clearly were written using AI by people who did not actually spend the time understanding what was made… That kind of proves the opposite point: you’re using those apps so they were good enough for the people who made it to get to you who would probably never even be able go write an app. Also are you comparing the apps to your average, bug ridden app written before LLMs ex…

No, it doesn't, because I gave up using them.

Re: Why care about programming languages

#46
post #15

Can't remember who said it, but I think the most poignant commentary about the prospects of LLMs completely replacing humans is the simple observation that yes, you can delegate many if not all of your tasks requiring thinking to LLMs, but it is inherently impossible to delegate the task of understanding . If you hope to write an efficient prompt which gives you what you think you want, you need to actually understan…

> would you rather review LLM-written assembly or LLM-written Haskell? I wish we had a language that was targeted specifically for LLMs to write and humans and LLMs to inspect: - Simple robust syntax - One obvious way to do things - Static type checking - Purely functional encouraged, escape hatches for performance - Inspect-able, testable, and reviewable in small pieces - Something like formal predicates, preconditi…

LLMs to inspect:

- Simple robust syntax

> - One obvious way to do things

That always leads to more verbosity. Much syntactic sugar is a more specialized way to do a subset of a more general thing. Why have `a + b` when you could just write `a.add(b)`? Because it's easier to read. The general functionality needs to account for all cases, the specialized one can cut that down just the things that matter to a specific common use case.

- Static type checking

\Which one?\

That's a very, very deep can of worms. One could argue that of an LLM is generating the code, then the type system doesn't need to be understandable to humans, so throw in all the features you'd ever want and just have the LLM change the code if it's not valid. Unions of higher order generic functions, sure! Or one could argue that there should be minimal magic, because the LLM understands the language only by its source, so everything should be explicit. If the LLM can prove that something is sounds to the compiler, accept it. Give ways to give extra evidence of soundness, like declaring invariants and contacts.

- Purely functional encouraged, escape hatches for performance

"One obvious way to do things", except when you need two. Purely functional except when it matters.

Why doesn't performance always matter? (And how will an LLM know if it does?)

Being purely functional is nice for data, but not for data structures that are updated in place. If all you do is stream data from one DB query into another, then your mutable state is the database. Otherwise might as well accept that it's a multiparadigmatic language with both imperative, functional and OO features. Just like all the others.

- Inspect-able, testable, and reviewable in small pieces

Good modularity and abstraction. No global scope. Maybe something like dependency injection to decouple from dependencies? (That does not make code readable, though.)

- Something like formal predicates, preconditions, post-conditions, assertions, or effects typing

That! LLMs look at the source. The more explicit the source is, the less it has to infer from context or existing knowledge. If the LLM can create its own predicates, accepted by the static type/analysis system, to prove that it's code is sounds, that allows more flexibility than having to fit into any fixed type system. Do we want or need that flexibility? Maybe. Most LLM-generated code is directly inspired by existing idiomatic code in the same language. Some is translated from other languages, trying to match up idioms. Some is just blindly trying to make unit tests pass. We could end up with generated predicates tailored to specific unit tests, not the actual concept.

Re: Why care about programming languages

#47

Can't remember who said it, but I think the most poignant commentary about the prospects of LLMs completely replacing humans is the simple observation that yes, you can delegate many if not all of your tasks requiring thinking to LLMs, but it is inherently impossible to delegate the task of understanding . If you hope to write an efficient prompt which gives you what you think you want, you need to actually understan…

This is absolutely the headache I’m having today, an enthusiastic contributor pasting AI generated wall-of-text comments to justify their 500 line PR.

How can we have a conversation and reach a shared understanding if one of the participants is avoiding attempting to understand the problem?

I have no problem with AI generated code, provided it’s reviewed, but I might as well be talking to a brick wall if the person hasn’t understood.

Re: Why care about programming languages

#48
post #8

There's a lot that's worth thinking about and discussing on this topic, but it's too loaded with emotional stuff for many people to hope for a productive discussion. I'm a programming languages nerd. I was paid to program in over 20 different languages over my 25 year career. I read up on many more languages along the way, and I wrote pet projects in a few of those. I've written a couple assemblers, compilers, and in…

IMHO, we need programming (formal) metalanguage, not just another language. Something in which can express e.g. an architectural discussion with LLM.

Natural languages are not logically sound, because meaning of words can shift. We need to express ideas about programs, desired properties, and specification in a language that is semantically sound and thus gives consistent solutions to consistent requirements.

Of course, the metalanguage can have the same foundation as the programming language itself. It could be expressed in Lean for instance.

What is needed is to build a library of abstractions in the metalanguage that are similar to words understood by an LLM, but in a logically consistent manner.

Re: Why care about programming languages

#49
post #19

Earlier quoted context omitted.

That’s a little black and white though. It’s ruling out that the AI could make a pretty good guess as to what you likely wanted to convey. If it gets that right, then you didn’t need to understand it nearly much. When I observe its reasoning I see it doing this all the time.

How does the AI guess?

Using statistics. They’re probably better at it than we are.

Re: Why care about programming languages

#50
My big problem is that nobody is working on truly innovative programming languages anymore.

Everyone wants to build another iteration of a C style language with incremental improvement for little benefit.

The problem is that we probably reached the general purpose frontier a long time ago and there are just a few surface level things that need to be changed here and there, which is not worth a whole new language.

It goes against the programmer's ego, but the way forward is by adding more restrictions. The people complaining about the borrow checker in Rust just don't get it. If you want programming to improve, you will have to give up the ability to write every conceivable program.

Post reply on HN