Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: Solving compositional problems with Perl 6 roles

by Ovid (Cardinal)
on Aug 22, 2004 at 02:09 UTC ( #384892=note: print w/replies, xml ) Need Help??

in reply to Re: Solving compositional problems with Perl 6 roles
in thread Solving compositional problems with Perl 6 roles

I wonder if P6 will allow lists to does, is, has and the like? It would certainly make the syntax more friendly.

Yes, but how would it be implemented? When you have a variadic operator, how do you avoid slurping up the rest of the line? If only one argument is allowed and the operator always return the object it's acting on, the current chaining idiom works.


New address of my CGI Course.

  • Comment on Re^2: Solving compositional problems with Perl 6 roles

Replies are listed 'Best First'.
Re^3: Solving compositional problems with Perl 6 roles
by BrowserUk (Pope) on Aug 22, 2004 at 03:10 UTC

    I'll admit to having very little idea of what problems that would cause for parsing. I guess the list could be bracketed, but that wouldn't look so nice.

    Another alternative is to have the list terminated by the presence of the next keyword which may be possible, but could also be a problem depending on how the parser is implemented.

    Another is that the absence of a comma after the final argument is indicative of the end of the parameters for that operator, so the next token must be a new operator (or the end of statement.

    SQL parsers seem happy to cope with comma seperated lists of args between keywords. How much difference there is between that and parsing Perl I'm not sure.

    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2021-07-30 23:33 GMT
Find Nodes?
    Voting Booth?

    No recent polls found