in reply to Re: Enlightenment and Frustration
in thread Enlightenment and Frustration

Balderdash! I have a terrible memory. I've been using Perl for over a decade and I still have to look up the arguments for "push". (Is it push("$object", @list) or push(@list, "$object")? My brain hurts already!)

However, despite that handicap. Uh... what was I saying? Oh yeah. Despite my memory issues, I've found Perl to be an extremely useful programming language. In fact, I find Python to be a big pain because about 90% of my Perl programs are simple things that I use only once or twice. I don't want to write object oriented code.

I want to spew out the solution as quickly as my memory can (before I forget what I wanted to do). Sitting around and attempting to build an object models is just not for me. I want a variable that can be a string in one second, and a numeric the very next second. Perl fits this to a tea.

Then, there are the more complex stuff that I do. Complex little things that can take four or five thousands lines of code. Again, Perl comes to the rescue. I can quickly create object oriented code, cheat where I need to, and even produce code that is readable and supportable by others.

To me, Perl is the Leatherman of Programming languages.

Replies are listed 'Best First'.
Re^3: Enlightenment and Frustration
by Anonymous Monk on May 02, 2007 at 22:53 UTC
    Huh? The vast majority of my Python scripts are purely procedural. The libraries are OO, but that doesn't affect the structure of my code much.

    I made several serious attempts to learn Perl, precisely because I know my scripts would be more concise in Perl than in Python, but I find that my scripting needs are too erratic. Concision requires richness, and I can't retain such a rich language without frequent exposure. Excluding throwaway scripts, I typically spend half a day writing a script and then go several weeks without needing to do any scripting. My attempts to learn Perl ended because every month or two I tried to write a Perl program and ended up spending as much time reviewing the language as I spent coding.

    Python is a fairly small, simple language that doesn't present opportunities for wizardry. It's a perfect language for me, but it's probably an inferior scripting tool to Perl for people who are capable of retaining a useful subset of Perl.

    I don't understand how Python forces OO at all. I rarely define classes in Python except in fairly large programs, and even then I use them more as datatypes than to implement OO design.

      Agreed re Python allowing non-OO-ness.

      But:

      Python is a fairly small, simple language that doesn't present opportunities for wizardry.
      There are fewer opportunities for wizardry than in Perl, it's true (though to be fair there are cases where Python doesn't need wizardry ;-) but if you don't use objects in Python you'll overlook a lot. Examples include decorators, metaclasses, manipulating object construction using __new__, overloading of __setattr__ and __getattr__ and other namespace/dict hackery, bytecode hacks (see http://entrian.com/goto/ for instance), replacement of function code, etc.
Re^3: Enlightenment and Frustration
by Dru (Hermit) on May 03, 2007 at 19:28 UTC

    and I still have to look up the arguments for "push"

    I'm the same way. I have to look up the correct syntax of push every time.

    To me, Perl is the Leatherman of Programming languages.

    Awesome line, I hope you don't mind if I use that in my signature (which I will give you credit for of course). Two tools I couldn't live without.