Choosing Perl/Python for my particular niche
claird at lairds.com
Sat Mar 27 16:52:29 CET 2004
In article <406532F7.D56DC671 at doe.carleton.ca>,
Fred Ma <fma at doe.carleton.ca> wrote:
>Just wanted to add another example of stuff that
>I encounter alot of. As in many computer languages,
>various kinds of scopes are delineated by things
>like braces or begin/end statements. I often find
>it valuable to find an occurance of certain things
>(e.g. certain data declaration) within certain
>scope structures. Sed is convenient for that:
> Do some stuff,
> including conditional branching
>To avoid the hassle of writing a script file and
>filtering the input source file to an output source
>file, I often use gvim's awesome pattern matching
>and macro recording abilities. A sed script file
>can look pretty cryptic, especially when I want
>to search across physical lines (lots of conditional
>flow to append things to the hold buffer, etc..).
>For that reason, I tend to stay with quick/dirty
>practices in gvim. Crypticness (though not of the
>same variety) is one of the things that I found
>hard about ramping up on Perl, to the degree that
>I did. As I hinted earlier, a fair comparison would
>account for the fact that its power would be more
>apparent if I became adequately guru-like, but
>realistically, I will not spend enough time with
>it on a regular basis to expect that. Here again
>is a dichotomy; I appreciate the sed terseness because
>I can make a command line pipe stage out of it, but
>the same brevity in a scripting language can make for
>rough going. Maybe it's wishful thinking to expect
>one language to cover all the bases that I initially
I *really* don't know how to respond to this; a
sentence with "sed", "conditional" and "convenient"
leaves me at a loss.
Both Perl and Python are good fits for large popu-
lations. I have a lot of confidence that, in the
near future, you'll find the one you've choosen
handier than either sed or Matlab, *even for most
of the tasks at which sed and Matlab are good*.
Perl and Python are that strong.
Python's population has a greater propensity to
regard its readability as an advantage, while
Perlites often revel in concise power. Try 'em
both briefly, choose one that makes a good impres-
sion, and get back to your engineering work.
You'll be glad you upgraded to a 'P' language.
Cameron Laird <claird at phaseit.net>
More information about the Python-list