Loading ...
Sorry, an error occurred while loading the content.

Perl is a context-sensitive language

Expand Messages
  • Terrence Brannon
    The following message is a courtesy copy of an article that has been posted to comp.lang.functional as well. Perl is a programming language in which functions
    Message 1 of 1 , Feb 15 2:28 PM
    • 0 Attachment
      The following message is a courtesy copy of an article
      that has been posted to comp.lang.functional as well.


      Perl is a programming language in which functions demonstrate context
      sensitivity. They return different results based on whether they are
      used in a scalar or array context.

      An article by Randal Schwartz:

      http://www.stonehenge.com/merlyn/UnixReview/col38.html

      goes into great detail on this subject if you want to know more.


      I have programmed in Scheme and enjoyed it very much. I have done some
      SML and liked that as well, I feel safe in saying that
      functional/logic languages operate in a fundamentally different way.

      Context-sensitivity is one such fundamental difference.

      I wrote this post not to irritate anyone. Nor to say that one way is
      better than the other but just to note the issue.

      Note that the Chinese language is much like Perl in this way. There is
      no way to conjugate a verb to indicate tense, you simply place a
      temporal description in front of the subject and verb. To wit:

      yesterday, I go to the store
      today, I go to the store
      tomorrow, I go to the store

      Cheers,

      --
      Carter's Compass: I know I'm on the right track when,
      by deleting something, I'm adding functionality.
    Your message has been successfully submitted and would be delivered to recipients shortly.