logoalt Hacker News

WalterBright07/19/20251 replyview on HN

Recognizing `3+x*(2+y)` is compilation - even if the program is being executed while compiling it.


Replies

wvenable07/19/2025

You can continue to argue the point but that goes against every single definition of compilation that exists. Compilation is a transformation of programming language into another form. For example, taking `3+x*(2+y)` and transforming it into a series of byte codes, machine language instructions, ASTs, or even C code would be compilation.

The BASIC interpreter doesn't recognize `3+x*(2+y)` nor does it compile it instead it evaluates that expression using a pair of stacks. You've expanded the definition of compilation to cover almost all computation. It's compilers all the way down to the electrons.

show 2 replies