> Ruby is an awesome programming language entirely built upon the > concept of objects. While I just was astounded and excited when learning > Perl (because of its many features OO concepts...
How disappointing. Perl certainly doesn't limit it's usefullness only to the Object-oriented elite. IMHO, that makes Perl rock even more than Ruby. Oh, and if you like some of that cool Ruby goodness, well, you can always just install Simon Cozens' Rubyisms.pm module from CPAN. See http://search.cpan.org/~simon/rubyisms-1.0/ And from http://search.cpan.org/src/SIMON/rubyisms-1.0/README we see... NAME rubyisms - Steal some features from Ruby SYNOPSIS package Foo; use rubyisms; sub initialize { # We inherit a new from class Class self->{foo} = "bar"; # And we have a receiver, self __private_stuff(1,2,3,4); } sub __private_stuff { self->{things} = [ @_ ]; # self is still around self->another_method; } sub my_method { if ($interesting) { ... } else { super } # Dispatch to superclass } sub array_iterator (&@) { yield() for @_; } array_iterator { print $_[0], "\n" } ("Hello", "World"); .. Hehe. Perl *rocks*. Ruby just *wishes* it could rock this hard. And wait 'til Parrot/Ponie/Perl6 is out. Oh, and Simon implemented *ALL* of the above in a mere 90 lines of Perl code. If you _really_ want to learn about OO and even more ways in which Perl makes OO easy where other languages "hit the wall" (e.g. closures and multiple inheritance in Java), then you should get Damian Conway's book Object-Oriented Perl (ISBN 1884777791 - http://www.manning.com/Conway/ ). Unbelievably lucid, and it's no mistake that he used Perl to demonstrate these OO concepts. The "eat-your-brain" explanation of Perl's "tie" feature is excellent. He discusses multiple inheritance, data inheritance vs. interface inheritance, closures, functions as objects, truly private data members, inheritance by composition, and explores some of the dark corners of Perl's "tie" facility, re-blessing objects, and more. Mike/ --------------------------------------------- http://www.valuenet.net ----------------------------------------------------------------- To get off this list, send email to [EMAIL PROTECTED] with Subject: unsubscribe -----------------------------------------------------------------
