Re:Fun with Python bytecode – Generate and modify it using e...
by stinos on Saturday June 21, 2014 @01:46AM
(#7924301)
While I'm with you on the definition point (it is interpreted) I fail to see the relevance of that last paragraph??
Re:Fun with Python bytecode – Generate and modify it using e...
by gamegoblin on Saturday June 21, 2014 @03:14AM
(#7924412)
User voidlogic was pointing out that converting to bytecode before interpreting was so mainstream (and relatively simple) that even undergraduate students do it for an assignment.
My point was almost every mainstream interpreter does this (and has been for decades). So him saying "Python... was an interpreted language. While not completely wrong, it is not entirely true either." is confusing and inaccurate. It is completely true that Python is interpreted (and like almost every other interpreted language its the bytecode that is interpreted not the source code).
When I was doing my undergrad we had an assignment to write an interpreter, at the end of class our new assignment was to make it 10x faster. So we did this by converting the parse tree to bytecode rather than directly executing it as it parsed. It wasn't hard or advanced work.