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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Disclaimer: IANAL. I am not a lawyer linguist.

The syntax of (for example) $cgi = new CGI; is called indirect object syntax, which is also said to be in the dative case. Are these actually the correct designations?

Let me elaborate on that question. The way I understand grammar, it should be direct object (or accusative) instead:

$ball = new Ball:Soccer; # Creates a soccer ball. kick $ball; # Ball::Soccer defines sub kick {...} # I.E. this reads $ball->kick;

We can easily defend that in this example, $ball is not a subject ("it performs the action expressed by the verb"). Rather it could be argued that it is a direct object ("Entity acted upon", I.E. the action is to kick, the thing which is kicked is the ball). Also:

One rule of thumb for English, however, is that an indirect object is not present unless a direct object is also present

Wikipedia: Object (grammar) - Types of objects

For a dative case to be present, we'd need something like

$ball = new Ball::Soccer; $john = new Person; give $john $ball;

And even here, $ball would still be the direct object, or accusative (the object which is being given) and $john would be the indirect object, or dative (the object to which (or rather whom) the ball is being given).


In reply to "Indirect" object syntax? by muba

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-03-28 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found