Perl makes a good first language for several reasons:
- It grew out of a need to parse text -- it's built closer to the way people speak than the way machines process information.
- It's forgiving, quick to develop, and the write-compile-debug cycle is short, thanks to the interpreter/compiler.
- It's expressive and powerful, but useful even with a small subset of commands.
- It encourages good programming practices -- if you want it to.
- There's more than one way to do it.
It can be tricky for a few other reasons:
- It's tied to Unix by some syntax and other design decisions. That's a plus, in my opinion, but unless you've learned or are learning Unix as well, some of the higher-powered features of Perl will be harder to understand.
- It's not a purely functional or object oriented language (thank goodness). That kind of flexibility might make it difficult for someone to learn a new language.
- There are few enforced disciplines. If you start strictly (pun intended), you'll probably do okay, but if you cultivate lazy habits, you'll have to unlearn them later. More bondage-oriented languages (er... the ones with strong typing and forced indentation rules :) have some initial pain in this area, but rapidly bludgeon you into submission.
Okay, only the first of those possible cons has much merit. I do believe that learning a handful of languages will make you a better programmer afterall -- and at least one of those should be very low level, either C or some form of assembly.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|