![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re: Perl 6, Object Orientation and Melting Brainsby BrentDax (Hermit) |
on Mar 28, 2005 at 01:34 UTC ( #442725=note: print w/replies, xml ) | Need Help?? |
Essentially, all data in Perl 6 will be in the form of an object. That doesn't mean you're going to have to put dot operators everywhere, though. Perl 6 will support alternate syntaxes (lc $string and print $fh: "foo") for people who don't want to think about methods. A few features will require use of objects, but most of them are ones that are only interesting to people designing classes anyway. (A notable exception is the grammars feature, which is implemented in terms of classes. Basic regex use doesn't require OO, but combining them into formal grammars does.) Oh, and there will likely be a mechanism for a user to give a class a CGI.pm-style default object. I don't think the exact syntax has been worked out yet. Edit: I forgot to mention that "everything is an object" doesn't mean "everything is passed by reference". In Perl 6, $letters="abc"; $company=$letters; $company ~~ s/a/b/; won't change the "a" in $letters. =cut
In Section
Seekers of Perl Wisdom
|
|