Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl 6, Object Orientation and Melting Brains

by BrentDax (Hermit)
on Mar 28, 2005 at 01:34 UTC ( #442725=note: print w/replies, xml ) Need Help??


in reply to Perl 6, Object Orientation and Melting Brains

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
--Brent Dax
There is no sig.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2023-09-24 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?