I was looking up linked lists in Perl on Google the other day and ran across the following article by none other than Mark-Jason Dominus, Why I Hate Advocacy and allowed it to stir in my brain for a while. Okay, I'm now done stirring, and I still don't like the article.

It is not that I think the entire article is wrong. I just think it confuses advocacy with other things. Let me discuss:

  • "Advocacy has become so natural to us that we forget there is any other way to discuss programming languages."

    When you attend college and are forced to learn a programming language the assumption (at least in my case) is the 'correct' language to use is C or C++. The examples for algorithms are written in C with meaningless variable names like a, b, c, etc. There is no elegance, only utility and (if you are lucky) efficiency (which is not always the case...The Little Schemer, a popular book used for Lisp programming shows you how to recursively find the difference between two numbers by subtracting one from each until one of them reaches zero FIRST!).

    I do not suggest that we abandon using C/C++ for education. However, we are faced with a dilemma in computer science education that is largely ignored -- the 'tediousness' of discussing computer programming/algorithms in C/C++ or whatever (or the mega-obscure PSEUDO-CODE). The plain fact is we must 'choose' a language to use to discuss algorithms. C++ tends to clutter the conversation with classes; other languages change frequently and in strange ways that also tend to confuse the conversation. Let's do it in Perl.

    The author goes on to describe discussions he has had with students regarding the differences between strongly typed languages and Perl. His students clearly did not understand the difference. But is the culprit advocacy? No. If advocacy uses the 'TRY before you buy' approach, the students would already understand that Perl is not the most efficient language for IMPLEMENTATION of every solution, but rather, is more than adequate for DISCUSSION.

  • "..using PHP can't possibly reflect badly on Perl"

    True. I agree with this statement only if a) the original system design was not modular b) the original system was relatively small but had high utilization and cost considerations make this necessary.

    If you designed a web based system using dozens of custom Perl modules that would take time and effort to port to a different language it makes sense to attempt to upgrade the code to mod_perl (or something similar) before trying anything else. Otherwise you are needlessly spending time and money to retest business logic that could be better spent on performance.

  • "...drink the Kool-Aid and ascend to programmer heaven"

    The author argues that programmers confuse their language as being an extension of their bodies, "They start to identify themselves with Perl, as if Perl were part of their body..." What the author, in my opinion, ignores is that the language lends itself to this due to its fluidity. Perl mimics natural language expression. This is inherent to its design. So it makes sense that programmers that have become proficient in it will naturally try to use it first.

    If I try something in Perl and find that the same thing works better in PHP or whatever my next line of questioning is 'why'? The bad discipline, the one I think the author is really talking about, is to stop there. But when I dig (mostly because it is FUN to do so) I find that there is no module or the existing one needs a rewrite. Now I am doing the homework, the foundation of 'good' advocacy. It is harder. It takes more time. But I love the language, and these are its labors.

  • "I don't think of myself as a Perl Programmer..."

    Strange, if you type "Mark Jason Dominus" in the search line at Google you get dozens of links that have "Perl" in the title. The top five hits do not read "C++" or "Pascal" or anything else. Behold, Mark's latest book, Higher Order Perl is also about Perl. I'm grinning as I write this.

    Calculus survives to this day because Newton/Leibniz and others came up with new ways to do things and published their works (at least that is what they made me believe in school). What do you think would have been the result, and hence the history of mathematics, if, when challenged, Newton had thrown up his hands and recanted?

    The same argument can be made for Charles Darwin's evolutionary theory or Einstein's stand on Quantum Mechanics. A debate on these continues to this day. If we didn't have strong advocates, who would we look for when we wanted a good argument?

    So I say that I WANT to do it all in Perl. I don't use the statement, "that cannot be done in Perl." Rather, at worst, I say, "that appears to be something we haven't gotten around to yet" or "that appears to be something no one has taken an active interest in doing in Perl." That's my advocacy. Now I realize that the article I am discussing is several years old. I wonder in light of Mark Dominus' new book, if today he still believes it?

    Update:According to Aristotle my post is a 'rant.' The purpose of this post is not encite language debates. Rather is to discuss the proper nature of true Perl advocacy and what I saw as an improper characterization. Larry Wall is a great example that supports my point. He is impertinent. He is persistent. Some wish he would just stop and adhere to the status quo. He, apparently, refuses. Now, that's an advocate.

    Update 2: I think radiantmatrix's post(499234) does an excellent job of clarifying and expanding upon the virtues of an advocate. Great job!

    Celebrate Intellectual Diversity


    In reply to But I WANT to do everything in Perl! by InfiniteSilence

    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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.