logoalt Hacker News

verbatimtoday at 5:04 PM3 repliesview on HN

Interesting. The article states "The compiler prints the value as a given variable changes." -- surely it means the program does, and not the compiler?


Replies

dtoffetoday at 8:10 PM

The compiler produces p-code to be interpreted by an interpreter, so it is the interpreter that prints the value.

monocasatoday at 5:20 PM

I take it to mean that the compiler inserts variable print code on variable modifications.

compiler-guytoday at 7:36 PM

It might be more precisely stated something like "The language's semantics require that when a variable changes value, that change includes the side-effect of printing the new value."