Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

I guess we have different working definitions of what "deterministic" means.

Wikipedia says:

A deterministic algorithm is an algorithm which, in informal terms, behaves predictably. Given a particular input, it will always produce the same output, and the underlying machine will always pass through the same sequence of states.

Perl's parser, due to it's pluggable nature, does not adhere to that definition. The output can vary for a given input, and it varies because the underlying states visited vary.

I've looked at more format definitions elsewhere and reached the same conclusion.

In this case, one could even argue that it's [...] a matter of determining whether Perl will get around to assigning meaning to some code.

When one discuses whether Perl can be parsed or not, one is not referring to the time it takes or even if it's finite. One is discussing whether the output is stable enough to study or store for future use.

Let's take C++ for example. One would consider C++ to be parseable. One can perform static analysis on C++ code. C++ code can be compiled. Yet, it's possible to introduce an infinite loop in the parser because C++'s template system is turing complete.

The difference between C++ and Perl is that C++'s parser is confined to making decision based on its input, whereas Perl's parser can make decision based on external data.


In reply to Re^7: Perl is not Dynamically Parseable by ikegami
in thread Perl is not Dynamically Parseable by Jeffrey Kegler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (7)
    As of 2014-07-11 04:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (218 votes), past polls