Why is Python a good first scripting language?
Alessandro Bottoni
alessandro.bottoni at infinito.it
Sun Oct 20 18:10:34 EDT 2002
Alle 22:17, sabato 19 ottobre 2002, Tim Teebken ha scritto:
> Hello, I'm a Windows developer looking for a versatile, open source
> scripting language that runs on Windows and other platforms. I'm not
> terribly interested in religious debates about languages, and wouldn't mind
> learning several of the open source options eventually. But now I need to
> choose one to start with. Here are some things I'm looking for:
>
> (1) Clean, terse, easy-to-read syntax. All subjective terms, and everyone
> will claim these apply to their favorite language, but still it's a
> distinction worth making. A language that is easier to maintain, and in
> which one can quickly become productive, is more helpful to me right now.
Python is considered clean, terse and easy-to-read even by its own enemies...
I personally tried (and sometime I still use) Perl, PHP, Ruby and REXX. No
other language can compare with Python from this point of view.
>
> (2) Not captive to one methodology. To the man with a hammer, everything
> looks like a nail. Though I generally practice and advocate OOP
> methodology, I don't want a language so captive to that or any other
> approach that it creates extra work in some cases, or makes it impossible
> to tackle problems in different ways.
Python allow you to program in any decent way (OOP or Procedural). It DOES
try to keep you from messing up with the code.
>
> (3) Now to qualify (2): it should not be a language with so many ways of
> doing things that you can't identify a "best way," or at least a "good
> way." Perl has been noted for having nearly infinite options for tackling
> problems, which is a strength and a weakness.
If you know Perl and like it, stay away from Python. In Python there IS a
right way to perform a task, even if the language does not force you to use
it.
>
> (4) "Fast enough" performance. It doesn't have to be faster than competing
> scripting languages, but shouldn't be radically slower.
Python is the fastest interpreted language I have ever seen.
>
> (5) Extended and extensible. There should be a reasonably large set of
> free and commercial modules and extensions available, and it should be
> possible to extend it yourself via a lower-level language.
Have a look at the huge amount of modules available at these three sources:
- the STANDARD Python library (supplied with the interpreter)
- the ASPN.activestate.com "cookbook" site
- the "Vaults of Parnassus" web site
Is not it enough?
Extending Python is extremely easy, even if you want to use a C module. Have
a look at SIP or SWIG.
>
> (6) Large user base, active developer community, and a large set of free
> and commerical documentation. In other words, it has a healthy "growth
> index" and bright future relative to near competitors.
Half a megabyte of e-mail messages per day on the python-list is a good index
of the vitality of this language and its community, I think.
>
> (7) Internal consistency and expressiveness. As with (1), these are
> incredibly fuzzy terms, but the point is to find a language that has not
> just grown by mindless accretion, like many hospital building plans, where
> more "stuff" just gets tacked on in kneejerk reaction over the years. I
> value languages where there is some evidence the designer(s) value things
> like clarity, consistent semantics, even aesthetic appeal. A "beautiful"
> language should get out of your way, should allow you to think about
> problems in the world in a way that is simple and elegant, not clumsy, not
> overly complicated.
Python was designed in this way by a very strict group of very brilliant
minds (Guid Von Rossum & C.). The result is a language much more "beautiful"
than every other one (in particular, much better than Perl).
>
>
> Now with these criteria in mind, I'm considering Python. Already I ruled
> out Perl as a first choice, not that it couldn't be useful or even
> preferable for certain text processing tasks, but based on some of the
> criteria above, and my own viewing of a number of Perl modules, it already
> grates on me. Also interesting are some of the functional languages, for
> example Haskell, but I wanted something a bit more mainstream for now. A
> colleague recommended Ruby, and it does look interesting, although
> obviously it doesn't have the size and extend of the Python community yet.
I tried Ruby (and I still use, sometime). It cannot be compared to Python.
Ruby has a very "quirck" sintax and a few weird things I just cannot
appreciate. The community of Ruby is much less "sparkling" than the one of
Python, IMHO.
>
> So what it comes down to is, what is it about Python that would make it the
> best place to start, when you only have time to learn one scripting
> language? Using the criteria above, what makes Python preferable to its
> nearest competitors?
>
The fact that you have just enough time to learn ONE language. Python is the
best investment for your professional future that you could even make.
---------------------
Alessandro Bottoni
More information about the Python-list
mailing list