Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: "Indirect" object syntax?

by LanX (Archbishop)
on Nov 23, 2015 at 03:24 UTC ( #1148364=note: print w/replies, xml ) Need Help??


in reply to "Indirect" object syntax?

I think it's called indirect syntax in contrast to CGI->new being the direct syntax.

I doubt anyone was thinking in the accusative / dative pattern.

Though you might read new CGI as calling new from CGI .

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^2: "Indirect" object syntax?
by muba (Priest) on Nov 23, 2015 at 03:57 UTC
    I think it's called indirect syntax in contrast to CGI->new being the direct syntax.

    /me ponders that...

    Possibly.

    Though you might read new CGI as calling new from CGI .

    This would hold for new SomeClass, mostly because "new" is hardly a verb. It's an adjective, at best. Were new called create (construct, make, whatever) instead, as in $cgi = create CGI then we'd be right back at the kick $ball example. The grammatical object (CGI, SomeClass, $ball, $foo, et cetera) we're dealing with is something that is directly acted upon.

    Another example could be save $file, assuming that somehow $file->can('save') . Again, the grammatical object is a direct one.

    Contrast that with

    move $file "~"; # $file->move("~"), or move a file to one's home dire +ctory, # where $file is the thing being acted upon *directly +* # and "~" is just another grammatical argument to the + verb.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2019-11-15 18:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (84 votes). Check out past polls.

    Notices?