Congratulations, you’ve illustrated the difference between syntax and semantics. But any competent compiler also handles semantics (just in a separate phase of compilation), because that’s necessary for any useful conversion to machine code, not to mention optimizations.
It’s more like they handle a smaller, toy version of semantics that you can actually code a compiler for. In OP, something semantically correct in that version but not by common sense was accidentally written.
Maybe an early LLM that talks about picking up fire would be a better analogy.
Congratulations, you’ve illustrated the difference between syntax and semantics. But any competent compiler also handles semantics (just in a separate phase of compilation), because that’s necessary for any useful conversion to machine code, not to mention optimizations.
It’s more like they handle a smaller, toy version of semantics that you can actually code a compiler for. In OP, something semantically correct in that version but not by common sense was accidentally written.
Maybe an early LLM that talks about picking up fire would be a better analogy.