Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Perl for big projects

by gloryhack (Deacon)
on Jul 11, 2006 at 19:40 UTC ( [id://560543]=note: print w/replies, xml ) Need Help??


in reply to Perl for big projects

My stock response to the "write only" myth: Chinese is a write-only language to those who don't know it.

I suppose that adopting that perspective might diminish or eliminate the desire to argue the matter of Perl's applications and/or utility.

Replies are listed 'Best First'.
Re^2: Perl for big projects
by Anonymous Monk on Jul 13, 2006 at 16:27 UTC
    My stock response to the "write only" myth: Chinese is a write-only language to those who don't know it.
    It seems like you are defining "write only" as a synonym for "don't understand". Which I think avoids the question. If you don't understand a language, you can't write it or read it. "Write only" means a person understands perfectly well what each individual statement means, but piecing together the big picture of what's going on can take an inordinate amount of time. As an example of a "write only" process, consider the act of writing a program for a Turing machine.

      By your definition, every non-trivial application in every programming language is write-only. No matter how proficient one is in the language used, the first encounter with a non-trivial application will find the reader in that state of understanding the details but not (yet) grasping the whole.

        No matter how proficient one is in the language used, the first encounter with a non-trivial application will find the reader in that state of understanding the details but not (yet) grasping the whole.
        The key thing here, I think, is the phrase "first encounter". In a write-only language the N-th encounter remains obscure.
        By your definition, every non-trivial application in every programming language is write-only.
        Seems like there's at least a grain of truth in that statement, no? And by your definition, there is no such thing as a write only language. Why bother inventing a new term for a non-existant concept?
      It seems like you are defining "write only" as a synonym for "don't understand".

      Probably it is closer to say that "write only" implies that the person making the claim only understands part of the language, not that it's entirely unknown to him/her. Case in point - I can fluently order food in Spanish, but I do not actually speak Spanish. Take me out of a restaurant setting, and I have serious problems understanding what people are saying (unless they happen to be talking about enchiladas).

      In Perl (or any other rich programming language), there are many ways of getting a task done. It is entirely possible to be able to write a decent Perl program, but not to be able to clearly grasp what someone else has written - even if it happens to do the same task.

      Your comment about a Turing machine program was excellent, and seems to offer a rebuttal to the complaint about Perl being "write-only". The original post discussed the criticism that Perl is too *rich*, that programmers had too many ways of saying things, making it difficult for other programmers to understand what they wrote. While there might be some truth to that idea, your idea is clearly another answer. A language that is feature *poor* is also hard to understand - perhaps even more difficult than one that is rich.

      I think this probably says that we don't really have a good definition for what "write-only" means, in the context of a programming language. Whatever it means, though, I don't consider the fact that Perl is rich, to be a defect. I like being able to do things in a variety of ways, even if it does make it more difficult for me to follow what someone else has done. That difficulty is a reflection of my own shortcomings, not of the language. I simply haven't learned what X means, yet. One great benefit of Perl Monks is seeing so many different, often (but not always) brilliant ways of getting something done. It forces me to stop, puzzle out why the Monk chose that idiom, and to decide whether this way is better than whatever I came up with.

      "Write only" means a person understands perfectly well what each individual statement means, but piecing together the big picture of what's going on can take an inordinate amount of time.

      Precisely.

      Given a passage of text in a language whose grammar is unlike any with which you are familiar (like, say, Chinese) and a dictionary translating the words of that language into one in which you are familiar, it doesn't take that long to reach the point of knowing what each individual word means, while still having no idea of the overall meaning. For me, at least, Chinese fits your definition of "write only" quite well, provided I have a Chinese-English dictionary available.

        Hmm. I still think that misses the point. A person armed with only a Chinese-English dictionary won't be able to create a sensible text (to people fluent in Chinese). Whereas a program (write-only or otherwise) won't run correctly unless it is properly structured. In other words, you need to know Chinese before you can create it. And if you did know enough Chinese to create sensible sentences, and Chinese was a write-only language, then you would *still* have trouble reading what you wrote.

        Or stated another way, "write-only" is a one-way process. To describe something as write-only you need to show it takes a disproportionate amount of time to decipher something, compared to the time it took to create it. The Chinese language isn't an example of this, because once you learn it, you'll be able to read it easily. An MD5 hash is an extreme example of the opposite. The process of creating the hash is simple, but turning a hash into a text is nearly impossible.

        I'll leave the question of whether Perl is "write-only" to the philosophers, but comparing the "write-only" nature of something to unfamiliarity with Chinese is completely bogus since it tries to skirt the issue by redefining it.

Re^2: Perl for big projects
by Anonymous Monk on Jul 17, 2006 at 17:37 UTC
    Chinese is a write-only language to those who don't know it.
    Yes, because as we all know, the Chinese language is lauded for its obfuscated nature.

      As we all know, every serious Perl hacker will immediately tell you that you should obfuscate all your production code.

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://560543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found