Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
(Slightly delayed response...)
I think your critic doesn't apply to mutators, where the first arg IS special.
I hadn't really thought of it this way, since $x->y(...) is proposed to be used in so many other ways (e.g. @array->grep(/blah/)). This almost makes me want to propose an $x op= ... syntax to make the intent explicit, but that way lies pain and bike-shedding.
Additionally in cases where dereferencing is needed,
As long as this doesn't violate the basic Perl principle that operators determine operand type, it's fine -- I have no problem with auto-deref.
Could you plz elaborate, I don't know Common Lisp, (only eLISPš)?
As a fellow Elisp user and Emacs lover...

In Common Lisp, a function call always looks like (NAME ARG...). So x = y is (setq x y) (or (set (quote x) y). When they added "OO", they kept that syntax, so $x->f(...) became (f $x ...). But they did better: if the meaning of "f" depended upon more than its first argument (like addition, or exponentiation, or some comparisons), then it still used (f ...) syntax, but let the programmer specify rules to decide what to do based on any subset of the parameters.

Of course, this being Lisp, it became something hairy, but see "CLOS" for the details.


In reply to Re^4: Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ) by educated_foo
in thread Autoboxing ... "Yes We Can" ( or how I learned to love TIMTOWTDI ;) by LanX

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 imbibing at the Monastery: (7)
As of 2024-04-16 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found