6 ms·
I'm sorry if I was unclear, but I still don't see any problem with this being called a compilation of one format into another.
by phaylon 17y ago
I'm sorry if I was unclear, but I still don't see any problem with this being called a compilation of one format into another.
- scott_s 17y agogdp's objection to calling this compilation, which I share, is that there is only one form.
- phaylon 17y agoNo, there isn't. There is the source, and there is the prepared and executed optree. The building of this is in Perl called the compile time phase. Which makes sense to me. I can't see how the source file and the parsed optree can be the same form. They do the same things, yes. But most source code and compiled forms have that in common.
- scott_s 17y agoAs I understand it, the "executed optree" is just the parse tree. The building of that tree is the lexing and parsing phase, not compilation. The parse tree is never translated into another form - neither an abstract syntax tree, nor another language with the same semantics. http://en.wikipedia.org/wiki/Parse_tree http://en.wikipedia.org/wiki/Parse_tree http://en.wikipedia.org/wiki/Abstract_syntax_tree http://en.wikipedia.org/wiki/Abstract_syntax_tree If the parse tree is never translated to another form, then I think it's fair to say Perl is interpreted, not compiled.
- pbiggar 17y agoWords mean what they mean. You could call any interpreter a compiler if you twisted it, and you'd sort of be right, but you'd be a lot more wrong. Same in this instance. Its an interpreter! And yes, it sort of does a job close enough to compilation that you wouldn't _really_ be incorrect calling it a compiler, but its not a compiler dammit!!
- phaylon 17y agoI agree that perl is not a compiler, but an interpreter. I disagree however if you say it doesn't perform compilation of the source.