Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
My mental model of programming is that the computer is the subject, the functions are verbs in imperative form ("commands" sic ;) and the arguments are direct and indirect objects.°

The benefit of OOP was to introduce "actors" which translates grammatically to subjects to me. So it should have better be named SOP.

And this is not purely philosophical, because I'm struggling with people who design their class instances as data containers. (Remember this talk about "How Moose made me a bad OO programmer" ?)

Hence the difference between push @a,$b and a.push(b) (the latter being JS) is passive vs active.

The Perl form being "push into @a the $b" VOO

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Update

°) actually that's incorrectly merging two phases, the programmer is the subject giving orders in imperative form, the program is the subject executing those orders.

I'm starting to feel like a character from Tron ;)


In reply to Re^6: The Basques introduced us to object orientation? (Update) by LanX
in thread The Basques introduced us to object orientation? by betmatt

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 scrutinizing the Monastery: (6)
As of 2024-04-24 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found