Comment by thaumasiotes

2 days ago

> this is a very stupid thing to say

Well, it does have the virtue of being straightforwardly true. For example, programming languages can't be ambiguous.

> programming languages can't be ambiguous

This is "straightforwardly" false.

Speaking specifically about the "language" part - while there is a formal specification for C++, many pieces are implementation dependent. Then there is actual undefined behavior that is part of a specification.

Actual programs implemented in a language can be ambiguous. consider multi-threaded programs where data arrive at different times in different threads, leading to different outcomes. Or just pure ambiguity of intent. Or a program which incorporates undefined behavior intentionally.

Formal and natural languages may overlap in some ways but it is ridiculous to compare them in this way and claim a probabilistic model is better at the formal language. Translation tasks are an example where LLMs perform extremely well, I would argue much better than in programming. Should I make the claim it's because of some intrinsic attribute of natural language vs formal language?

> programming languages can't be ambiguous

Yes, in C++ we call it "unspecified behavior" and "undefined behavior"

  • Those occur when you've made an unambiguous statement that has no valid semantics. ("God should get a promotion."†) They don't occur when you've made an ambiguous statement ("We saw her duck.") As I noted above, it isn't possible to make an ambiguous statement.

    † I'm aware that that isn't an unambiguous statement. This is for the simple reason that it's next to impossible to make an unambiguous statement in a natural language; that's why legal documents use so many clauses. I'm relying on the reader here to realize which meaning I had in mind, which is the way all natural language works.