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

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.

Replies are listed 'Best First'.
Re^4: Enlightenment and Frustration
by MonkOfAnotherSect (Sexton) on May 04, 2007 at 03:14 UTC
    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.