Python vs. Perl, which is better to learn?

Steve Holden sholden at holdenweb.com
Thu May 2 11:42:29 EDT 2002


"Patrick W" <quitelikely at yahoo.com.au> wrote ...
[...]
>
> import IMHO and sprinkle it liberally throughout.
>
> A programmer ought to know at least four languages in depth. If those
> four languages are well chosen, they can last a lifetime. If they lack
> certain features that come pre-packaged elsewhere, it's far better to
> acquire the _concepts_ and _techniques_ implicit in them, and
> implement them in your chosen language(s), as opposed to madly
> accumulating new notations simply because they possess a convenient
> feature or two.
>
So, what you seem to be saying is that I should have stuck with Algol 60,
PLAN, PL/1 and IBM 1130 assembly language?

> I think this popular notion of "right tools for the right job" is
> actually very harmful, both to individuals and to the science/industry
> as a whole. To stick with the tradesman metaphor for a moment, I think
> it creates a culture in which programmers are encouraged to become
> "jack of all trades, master of none." Resumes may be stuffed full of
> impressive sounding acronyms, but programmers actually don't know as
> much as they once did. It's not because we're stupid (although the
> barrier to entry is considerably lower these days); it's partly a
> result of having too many alternative implementation details to
> learn. When depth is sacrified for breadth, beyond a certain point, it
> becomes a very bad thing.
>
There is something in what you say, but I would prefer to think that one
moves to a new language precisely because it does offer better wasy of using
fundamentally new paradigms. If someone wants to use object-oriented
techniques they would be hard-put to graft them onto (say) Algol 60.

> To make sensible choices up front, and to focus on a few languages and
> topics to the exclusion of many others is the only way to go. That's
> why I reject this "learn them both" approach, unless the languages are
> different enough in purpose and style and philosophy to make them both
> worthwhile and complementary.
>
Another problem, of course, is that often times the learner has no choice,
or is badly guided, and then has to change anyway. Plus, of course, changes
of job can mandate changes of language.

> So, choice is necessary, but what to choose?
>
> IMHO, the best choices for starters are:
>
> * One of [C, C++] for maximum efficiency, minimal overhead and an
>   understanding of the low-level foundations of higher level
>   facilities.
>
I think it's dangerous to equate these two languages, as despite C++ being a
superset of C it contains many things, and implements many concepts, which C
does not. I regard them as being fundamentally different: C is a sort of
high-level assembly language, whereas C++ is a Swiss army knife.

> * One of [Python, Perl, Python, Ruby, Python, Tcl, Python] for general
>   purpose programming and scripting. For my money, Python is the clear
>   winner in this category. It's great for everything from text
>   processing and os scripting through to graphics, multimedia, comms,
>   database programming, web development, etc. It's just as much fun
>   for skilled hackers as it is for beginners.
>
Now you're talking.

> * Something that encourages a different style of thinking. My own
>   favourite (for this purpose) is Lisp. I feel that Lisp is powerful
>   enough to handle anything I'll ever throw at it, and it's flexible
>   enough to incorporate any new programming paradigms that computer
>   scientists are brilliant (or crazy, or foolish) enough to think up.
>
> * Whatever else turns you on.
>
[...]
> Absolutely. Then extend it with concepts and techniques from many
> other sources. There's far more value in that than in learning a new
> notation every few months (provided the initial choices are good
> ones).

Not all languages extend easily. Even Visual Basic, as sundry a hodge-podge
of accumulated features and syntax as could be desired, has had to be
mangled heavily to bring it into the .NET world. Most of the changes are
justifiable rationalisations.

The really interesting thing is the lack of noise from the VB community
about that, while the poor Python development team have to suffer howls of
anguish just to get True and False into the language ;-)

regards
 Steve
--
Steve Holden: http://www.holdenweb.com/ ; Python Web Programming:
http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list