Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Learning OOP

by Anonymous Monk
on Jun 23, 2003 at 15:26 UTC ( #268211=note: print w/replies, xml ) Need Help??

in reply to Learning OOP

Perl6 will be, but if you have little or no prior exposure to OOP I cannot recommend Perl5 for this purpose. (For purposes other than learning OOP, Perl5 is of course wonderful.) Python perhaps, though I personally found Python not to be to my taste.

My favourite book for learning the principles of OOP is the Inform Designer's Manual. The problem domain that Inform is designed to solve (besides being very interesting and providing an excellent didactic framework in general) lends itself spectacularly well to an OO approach, unlike the highly contrived examples in many books, and Graham Nelson is a superbly talented writer.

The only thing is, the book is compiled in the wrong order for this purpose, so you'll want to skip the early parts (about the procedural portions of the Inform language, arithmetic expressions, loops, and so on) and instead go straight to reading the chapters that cover the OO stuff. (The book can be understood just fine in this order, and in fact used to be ordered more this way in the third edition. But you want the fourth edition, because it has many improvements.)

The fourth edition is available both online and in dead tree format.

Replies are listed 'Best First'.
Re: Learning OOP
by jonadab (Parson) on Jun 23, 2003 at 15:38 UTC

    Err, neglected to login, but that was me. So if you reply and want me to _see_ your reply, either /msg me or reply to this message.

    {my$c;$ x=sub{++$c}}map{$ \.=$_->()}map{my$a=$_->[1]; sub{$a++ }}sort{_($a->[0 ])<=>_( $b->[0])}map{my@x=(& $x( ),$ _) ;\ @x} split //, "rPcr t lhuJnhea o";print;sub _{ord(shift)*($=-++$^H)%(42-ord("\r"))};

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268211]
[choroba]: The problem was bigger, as the test tried to call a method that didn't exist anymore
[marinersk]: :: ducking ::
[choroba]: because, someone renamed the method, but didn't notice it was used in the test, as the test was skipped
[marinersk]: Well, if the method doesn't exist, it would be hard to pass the test.
[choroba]: later, someone removed the new method, as all its usage places were safe, but didn't notice the test still used the old name
[choroba]: fortunately, it wasn't that hard to replace the method and fix a few remaining failures due to the changes we did to the codebase over the years
[marinersk]: choroba Sounds like a process improvement opportunity; tests may not all need to be run, but they should all be compiled with perl -c before check-in/promotion happens.
[choroba]: so, now I have the test, so I can start making changes in the code. Back to the original ticket, yay!
[marinersk]: I definitely love it when my $current_taask=& taskPop(); if ($current_task eq $original_task) { } is true.
[marinersk]: s/taask/task/g;

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2017-05-25 15:14 GMT
Find Nodes?
    Voting Booth?