Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Perl as Language

by Ambidangerous (Scribe)
on May 22, 2004 at 21:41 UTC ( [id://355630]=perlmeditation: print w/replies, xml ) Need Help??

It wasn't until after I started learning foreign languages that I really began to understand English.

Years of having adjectives, adverbs, and all that beat into my head by English teachers didn't really make the knowledge stick in my head as much as learning Spanish.

So it is with Perl. Follow my meditation:

C is to Perl as Latin is to English

Bash is to Perl as German is to English

Perl modules are to Perl as the academic disciplines are to English. (That is, no one has to invent science or history over again every generation . . . we record the method in spoken language, and someone else is able to use it and extend it)

I don't think there's a real world parallel for CPAN, though (more's the pity). You could say colleges and universities, but, realistically, that's a lot more like the M$ foundation classes (you have to jump through hoops to get them).

If there's anyone else on my wavelength out there (and that's probably unlikely, I've just finished playing with two different bands today for a total of four hours), let me know what parallels you can see.

perl -e"$jPxu='@jPxu';$jPxu^='Whats'^'UpDoc';print$jPxu;"

Replies are listed 'Best First'.
Re: Perl as Language
by Abigail-II (Bishop) on May 22, 2004 at 22:29 UTC
    C is to Perl as Latin is to English
    I disagree. C is far from a dead language, and C has orders of a magnitude more "speakers" than Perl has. In fact, if you take two programmers, the language they most likely share common knowledge of will be C - just like the English will be the most likely language two people share common knowledge of.

    C is to Perl like English is to Esperanto.

    Abigail

      C is to Perl like English is to Esperanto.

      Surely Esperanto would be Python - regular simple grammar, only one way to do it, etc.

      Perl would be more like Klingon (looked down on by those who prefer the syntactic purity of Esperanto - but actually has more speakers :-)

        Perl would be more like Klingon (looked down on by those who prefer the syntactic purity of Esperanto - but actually has more speakers :-)

        Man, that just made my afternoon.

        --rjray

        More people speak Klingon than Esperanto? *scoff*
        The problem is that no one uses Esperanto.

        Graciliano M. P.
        "Creativity is the expression of the liberty".

        So which one of you PM can actually speak one or both of Esperanto and Klingon?
      Latin too is far from dead, I find my knowledge of Latin to be most useful. As for programmers' lingua franca being C - the shared tongue of educated people throughout Europe was Latin until comparitively recently.
Re: Perl as Language
by BrowserUk (Patriarch) on May 23, 2004 at 09:24 UTC

    It has to be creole. Derived from many different sources, colourful, expressive and capable of being spoken with a multitude of dialects, some easier to understand than others.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail

      BrowserUk: Creole--that's exactly what I was reaching for. That or 'common practice' English (not English teacher English): there's more than one way to say what you mean (and plenty of cool slang).

      ggg: yes, that's dead on. C is at the base of a large family of languages, kind of like Latin and the Romance languages. On the other hand, Latin was more compact than English, because a lot more meaning was loaded into each word (verb => (verb stem, tense, subject), noun => (noun stem, plurality, (subject, object, indirect object, adverb, adjective, direct address) ).

      TomDLux: Now that I think of it, Bash & the file/text utils as a whole from are quite a bit like German. Some of the language constructions are very similar between German and Old English, just as the shell and older versions of Perl have a similar set of constructions (substituting in for $X in double quoted strings, here documents, open for input | output | pipe ).

      Keem em coming.

      P.S. As for Esperanto, I'd say that's more like Java (designed for with a particular philosophy in mind, with a fairly standard syntax). Except you can order coffee in Esperanto in a few words, as opposed to Java, where you'd spend an hour or more making cup, grinder, waiter, and money objects, and importing java.cafe.* (not to mention Java Beans (tm) ).

      perl -e '$jPxu=q?@jPxu?;$jPxu^=q?Whats?^q?UpDoc?;print$jPxu;'
      So is creole a language or is it just patois? And for that matter, what does that make cajun? I know its 'living', but I don't know that it is a language. I do know that it means I can't understand roughly half of my family, but I'm probably better off that way---maybe if we all learned Klingon?

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."

        I'm not sure if you were really asking for an answer, but I am probably the least qualified person on the planet to give you one :)

        On the basis of my reading of the information in the link I posted, creole is a family of langauges with at least 8 major and 20 minor sub-groupings.

        I don't fully even vaguely understand the mechanism (or more probably, classification) by which a patois transitions to a creole. Perhaps it is simply a case of how many speak it, or how consistantly it is spoken over time etc.


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "Think for yourself!" - Abigail
Re: Perl as Language
by TomDLux (Vicar) on May 23, 2004 at 03:24 UTC

    Perl does owe a significant heritage to the crucial Unix utilities: sed, awk, grep. The role of C has been to set the standard for common language expressions, such as the way for loops are structured, the short-cut assignment operators, and features such as operator precedence, which have become ubiquitous among other languages.

    --
    TTTATCGGTCGTTATATAGATGTTTGCA

      If I understand what you're saying, C is foundational to many computer languages as Latin is foundational to many spoken languages.
Re: Perl as Language
by dcvr69 (Beadle) on May 23, 2004 at 19:16 UTC
    I think a public library would be closer to CPAN than any of the above. With the exception that it's maybe easier to enter something into CPAN then into a public library. A large collection of useful (and not so useful) works/knowledge in English, open to the public. Hmm. They have stuff in other languages too. Maybe a section in a public library then, since CPAN is pretty much Perl only. :)
      I agree with this analogy, but I would add that for the Library to be analgous to CPAN it would have to have the librarians constantly reviewing books for errors after every change to the language and reporting those errors back to the authors.

      I think that the reason it is so hard to draw an analogy to CPAN is because it is unique in its mission and community.

      -Jim

        I would argue that it would be the borrowers of the books, not the librarians, doing all the checking - and every reader of a book CAN send a note to the publisher regarding typos, etc - and just like CPAN, if a publisher/author is no longer reachable, the work never gets updated unless someone else takes over maintenance. I initially thought that broke the parallel between modules and books, but then I realized there are textbooks, encyclopedias, etc, that are maintained by more than just one person, so the analogy still holds.

        As far as I know, there isn't any code review by the keepers of CPAN on the modules themselves. Automated testing maybe, but not actual review. Maybe I'm wrong on that, but it seems unlikely given the number of submissions they'd have to review.

        I've probably pushed this farther than anyone is interested in... so I'll stop now. :)

Re: Perl as Language
by pg (Canon) on May 24, 2004 at 00:21 UTC

    CPAN is UN.

    Everybody have a say there, and it is a useful resouce. At the same time, you really have to have your own say, and judge what is good, what is bad. Which modules are useful, and which ones are not.

Re: Perl as Language
by flyingmoose (Priest) on May 27, 2004 at 16:23 UTC
    I still think Perl is more like hieroglyphics. Visual, more so than spoken, abstract more so than most languages, intensely pretty to look at, placement of words and symbols is highly important and highly variable, and takes a great deal of dedication to become adept at understanding it. I'm not saying it's dead or anything -- just that it takes on a form most languages don't take.

    Lisp, for instance, might be cuneiform :) C is definitely a common language like English. Everybody knows it (or should), and it's very utilitarian. C++ is the language of people who have been drinking too much, stilted, inconsistent, and overly verbose while doing little more than what could be said in a few words of "C". Java, of course, is the ramblings of lunatics, who like to hear themselves talk and think they are among the coding Gods. VB (and ASP, etc) is the language of a 4-year old ... to some extent, not able to form complete and well structured thoughts.

      Interesting point--on the other hand, when I think of heiroglyphics, I think of something like APL or Commodore 64 Basic (such as I remember of it, I remember it had a lot of non-ASCII hoopajoos in it).

      I started learning Perl some time ago, and it's gradually been pushing me farther away from Windows, further into Linux land. As a result, only now am I learning the *real* basics--proper shell commands, etc. (I can hardly stand to use the old, tired cmd.exe DOS prompt anymore--many of you probably know the feeling.)

      The further I go into the original Perl enviroment, the more similarities I see in grammar and function--sort of like the day I read a passage in German out loud, and realized, if you slurred the words a bit, it sounded just like King James English.

      But the more I thought about the connection of Perl as a programming language to Perl as an actual form of communication, the more parallels I began to see. Some I didn't mention in the opening topic:

      • Perl poetry, of course.
      • Idioms.
      • Pronouns ($_, @_) = it, them.
      • Indirect objects.
      • Grammar rules (use strict;)
      • Professors of the language (use diagnostics;)
      • Power through conciseness @lines = <FILE>;
      • Arguments over proper grammar, because there's more than one way to say it.

      On the other hand, Perl has institutions that human languages don't: CPAN, yes, but the language as a whole has been improving and becoming more powerful each 'generation'--as opposed to spoken language, which, to paraphrase the Camel book, just changes so it can 'sit around being different'.

      $jPxu=q?@jPxu?;$jPxu^=q?Whats?^q?UpDoc?;print$jPxu;
        Programming languages and spoken ones have a different way of changing. In spoken languages, people just speak differently as time goes by, and after some decades or centuries, thing that would have been "errors" are then accepted to be correct usage. Whereas programming languages need to be changed (i.e. get a different compiler/interpreter) in order to accept "errors" as a correct input.

        I was never really fascinated by Esperanto, I'd rather have something like "simplified English" as an official international language. Common people in India prove that it's possible to simplify the English grammar radically and still be understood.

        About Perl, I like its flexibility. That makes it much easier to code than other languages. A good thing about perl are its warnings and error messages, they're quite smart sometimes. Quite unlike, for example, JavaScript where most of the times the interpreter only states something like "you made an error somewhere in this document".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://355630]
Approved by Popcorn Dave
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found