Hi:


> Date: Fri, 20 Jun 2008 11:05:54 +0800
> From: "Zak B. Elep" <[EMAIL PROTECTED]>
> Subject: Re: [plug] Perl's Learning Curve
> To: "Philippine Linux Users' Group (PLUG) Technical Discussion List"  
> <[email protected]>

> On Thu, Jun 19, 2008 at 7:06 PM, Ludwig Isaac Lim <[EMAIL PROTECTED]> wrote:
> >    Part of my job right now to maintain scripts written using Perl. I find 
> > learning "advanced"
> > concepts like modules and objects a bit difficult (Ok, I might be 
> > subjective due to the fact
> that
> > I need to learn it a short time).
> 
> Awesome, another Perl newbie! :)
> 
> Yeah, that's pretty subjective ;)  Have you read through perlmod,
> perlboot, perltoot, and perltooc in perldoc?  perlboot is especially
> treated for OO beginners and the like.

    Yup. I do. I'm also reading Simon Cozen's "Beginning Perl" freely available 
at www.perl.com
    Perl tutorial also tend to have a distinct culture of its own.
    
    
> >    I feel that maintaining Perl programs can be a tedious task (One thing I 
> > dislike about
> > TMTOWTDI). Learning it can be a quite difficult too, given the myriad 
> > notations. This is
> comparing
> > to other languages I've used such as PHP, C++ [I'm not that familiar with 
> > templates, but I
> managed
> > to learn STL in a relatively short time as compared to some features in 
> > Perl]
> 
> Yeah, TMTOWDI is a double-edged sword; if used wrongly it can lead to
> too many reinventions of the wheel.  Fortunately, although it is
> strongly associated with Perl, it is also true with all other
> languages as well.

    It tries to incorporate features from different programming languages 
(C,shell,awk), so people
with C,shell,AWK can learn it easily. The flip side is that people that came 
from "C","shell"
background will write Perl in "C-ish" or "Shell-ish" way respectively. For 
example, people from
C/C++ will use "for" loop as opposed to "foreach" loop to iterate an array, 
they probably tend to
use "system" function as opposed to using backticks (``).


   And some of the features that are supposed to make it easier, makes 
(maintenance) life harder.
Such as:
   a) "return" is optional even in "non-void" subroutine (I hate keeping track 
of $_ and friends)
   b) stuff like $a->[1][2], where (IMO) $a->[1]->[2] is definitely clearer

   And you can't guess from code such as " if ($var =~ /pattern/){...}" that 
"$var =~ /pattern/
can actually return an array context! (If you came from C/C++ background, you 
probably can
sympathize with me)
  


> I know the feeling of coming from C++ to learn Perl.  Perl doesn't
> have the same notion of objects as C++ does (since it lacks the type
> system of C) but you can try learning Moose for an alternative object
> system (Moose is actually an extension of Perl's object system
> carrying over the observations made in Perl 6; search the CPAN for
> it.)

    Perl's OO model is really different from C++, Java, PHP and even VB. Seems 
the "OO" is more an
after thought than an intended feature.

> >    Too bad there's no "Intermediate Perl" available in China (I'm in 
> > China). I find learning
> Perl
> > a bit difficult using the "Camel" book. I've also looked at 
> > http://perldoc.perl.org/ but I
> find
> > learning via web difficult as compared to learning via reading a book.
> 
> I learned my Perl from the Camel, but I didn't read it like a book,
> since it was originally from the perldoc available in the first
> release of Perl 5.000.  I recommend you do the same: focus on a
> chapter or two, and don't try reading from end-to-end.

   I tend to use the "Camel" as  a reference. I used "Learning Perl" to learn 
the language because
it is systematic, (easy to read linearly, and with exercises), and it 
immediately encourage good
practice such as "use strict".
 
> >    <Misc>
> >        Sometimes I find it amazing that some people in this list can have 
> > mastery of
> complicated
> > programming language such as Perl given the fact there's a HORRIBLE 
> > shortage of computer books
> in
> > the Philippines. Seems that the number of computer books in Philippine 
> > bookstores are
> DECREASING
> > each year. Feel appalled about it....
> >    </Misc>
> 
> I don't really see it decreasing; rather I see the same books on the
> shelves for several years already, even when some of them are pretty
> much obsolete already.  Still, some old texts give useful bits that we
> take for granted now in daily work.
> 
     It seems that O'Reilly books are getting fewer, and you can't find books 
such as "Effective
C++","TCP Illustrated (Vol. 1-3)", "Effective STL", etc...

     Glad to meet developers here.

Regards,

Ludwig Lim


      
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to