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

Re: Perl 6, Object Orientation and Melting Brains

by BrentDax (Hermit)
on Mar 28, 2005 at 01:34 UTC ( [id://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 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.

--Brent Dax
There is no sig.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-05-26 05:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found