Just another Perl shrine | |
PerlMonks |
Re: Perl Cannot Be Parsed: A Formal Proof (meh)by tye (Sage) |
on Jan 21, 2008 at 19:02 UTC ( [id://663416]=note: print w/replies, xml ) | Need Help?? |
Sorry, I don't buy this proof. In the last code block:
is_whatever_nullary() can certainly easily return a true value without having to execute run_turing_equivalent(). The whatever prototype is a compile-time property and the run-time impact of whatever run_turing_equivalent() does will not change the fact that whatever() is "nullary" at compile time. But it is quite obvious that Perl code can't be reliably parsed without running Perl code by the simple example of:
You can, of course, replace the above conditional with some high-falutin' comp sci construct of your choosing. But I find that such just detracts from the obviousness. You have to run "0.5 < rand()" in order to parse the last line of the above Perl code (which perl can parse differently each time that it is run, as shown below).
- tye
In Section
Meditations
|
|