Hacker News new | ask | show | jobs
by 9rx 22 hours ago
Only if the compiler is perfectly naive. With the state of today's optimizing compilers, the output might be very different from what you'd expect. But it also doesn't matter because the business goal is the results from executing the program, not the static code. Hence why, as the earlier commenter pointed out, efforts go into validation rather than understanding the generated code. 99% of the time the code a compiler spits out simply doesn't matter. The same is now proving true as we move up a level of abstraction. The code spit out from an LLM doesn't matter any more than the code spit out from a compiler, only validation that it functions as expected matters.
1 comments

compiler is not putting words together randomly with a mathematical probability but the LLM is
Yes, the difference between a compiler and an LLM is that a compiler's output correctness is binary, whereas an LLM's output correctness is probabilistic.

That may be an interesting distinction in a vacuum, but given that the input to both is words put together randomly with a mathematical probability a compiler's binary correctness isn't actually the useful property that it may first seem. In the real world, to overcome the probabilistic input, you have to validate the input with respect to the output. And it turns out once you have systems in place for that, you gain the same assurances with a probabilistic output as you do with binary output.

So, while there are some technical differences, there is no practical difference.