Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I never thought of bytecode as its own class with its own identity before.

What do you mean? How did you think of it before?



Hmm. Like codes in bytes, I guess, as a way to pick low-hanging fruit in an interpreter. It just never occurred to me to think much of the bytecodes themselves as the most salient piece. Perhaps bytecode is the best word to describe anything non-native that runs? I'd normally want to say interpreted, but I suppose that technically would exclude anything running in a JIT. Although, where something happens to be running isn't an intrinsic property of that thing. On the other hand, whether a language compiles to bytecode or gets directly interpreted is not a static feature of that language, either. Maybe bytecode is the best way to split the difference. Is this the birth of a new bit of language? You heard it here first.


What do you mean by "gets directly interpreted"? Interpreting the AST? Writing a bytecode interpreter is pretty easy and can run much faster than a tree interpreter, especially when you use gcc extensions (taking addresses from labels and filling a jump table with it, which eliminates the long "if ... else if ... else if ..." like code a switch statement creates).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: