Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Perl tutorial building on Python skills?

by eyepopslikeamosquito (Archbishop)
on Oct 20, 2021 at 09:09 UTC ( [id://11137782]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl tutorial building on Python skills?
in thread Perl tutorial building on Python skills?

> A read of perl philosophy is surely worth, but if they are already programmers then ModernPerl is the right book.

Oh yes, strongly agree. Especially given the pupil is already an experienced programmer. chromatic explains why Modern Perl is so short (see also the excellent reply by xdg):

Modern Perl assumes you're already decent at programming, so it elides some basic stuff in favor of explaining how Perl works from philosophy to programming in the large. Learning Perl assumes you've never programmed before, so it spends more time on the basics, covers less of the language, and doesn't explore the philosophy of Perl in as much detail.

Modern Perl also tends to be kept more up to date with the latest version of Perl than Programming Perl, say.

Depending on your pupil, it might also be worth emphasizing the difference between Readability and Maintainability.

Not sure if you're planning on mentioning TMTOWTDI or TIMTOWTDIBSCINABTE but I noticed when playing code golf that Python often out-TMTOWTDI'ed Perl! :)

Update: Regular expressions are built into the language in Perl, while in Python they're provided by the re module -- this makes a massive difference in terms of convenience and ease of use, so you'll probably find yourself reaching for a regex solution more often in Perl than Python (especially if you're tybalt89 ;-).

Another key point that should be carefully explained in your course is Perl's unusual use of context, especially scalar vs list context.

Further update: Autovivification is yet another Perl quirk -- see "Emulation in other programming languages section" for one way to emulate it in Python. See also: Re^2: Honest question about Perl, Python and Ruby (autovivification), which shows how I emulated it in Ruby.

  • Comment on Re^2: Perl tutorial building on Python skills?

Replies are listed 'Best First'.
Re^3: Perl tutorial building on Python skills?
by BillKSmith (Monsignor) on Oct 20, 2021 at 13:57 UTC
    I had planed on making much the same argument for "Perl Best Practices". I have now decided that for this purpose, it is little more than an expansion of 'Modern Perl's chapter on "Perl Beyond Syntax". I continue to recommend the Preface of "Perl Best Practices" for its discussion of the goals of "best practice".
    Bill
Re^3: Perl tutorial building on Python skills?
by LanX (Saint) on Oct 22, 2021 at 15:12 UTC
    Thanks!

    > chromatic explains why Modern Perl is so short (see also the excellent reply by xdg):

    Actually the second chapter in Object Oriented Perl (which xdg is dissing) includes a very good overview of (non-OO) Perl in 60+ pages.

    Damian is a brilliant author and it's a good base for an experienced programmer. (Plus I have the German translation which makes communication easier)

    Modern Perl then is larger and goes more into details and is already available in their office in Berlin.

    This should give a very good foundation to build on.

    Then later combined with my own self assessment quiz ° plus links into the docs, should clarify remaining issues.

    (I don't want to start learning Python in deep for this :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    °) RFC: Self Assessment Perl

      > Damian is a brilliant author

      Agreed. Always a joy to read! (ditto for chromatic and brian_d_foy).

      Unlike chromatic though, I often struggle to find free stuff from The Damian that I can link to here (I often find myself linking to Ten Essential Development Practices). If you know of other useful online stuff written by Damian, please let us know.

        No sorry, I don't.

        I'm only aware of three books, ("Perl Hacks" was also co-authored by him)

        There are slides from merlyn covering PBP online...

        I think the summary table at the appendix of PBP are available somewhere, since they influenced Perl Critic.

        update

        I think citing from an appendix of a PDF version is still fair use, as long as you make the source clear.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137782]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-16 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found