I'm not quite sure I follow how that would happen? I always thought that it was the compiler that dealt with the parsing and semantic analysis of direct and indirect object syntax. By the time your code is involved, it's just a method called with an object handle isn't it?

I only use the indirect syntax for class methods rather than instance methods. I like the distinction, but I'm not locked into to it.

I'm still unconvinced by the arguments against indirect object syntax. It seems that there are thousands of lines of perl written every day that use it with print and printf. The cavaeats are fairly clear and the solutions well documented.

Personally, I'd like to see it's problems addressed so that I could make more use of it. We have prefix/ infix/ postfix operators for numbers. Why not other objects?

I'd hate to have to write  3->-() for unary negation, or $n->predecrement(). And I can see many places where indirect object syntax could be used to great benefit. I don't use it (other than as outlined above) because of it's current limitations, but I think it would be a shame to see it's potential for clarity being thrown away. Maybe the parser could never be 'fixed' in this respect, and maybe there is a fundemental reason why it couldn't be made to work as well for the general case as it does for numbers. I don't have the experience with writing code parser to know, but instinctually, I'd like it if that were not the case.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.


In reply to Re: Re: Re: Re: Re: DWIM: autoloading classes by BrowserUk
in thread DWIM: autoloading classes by Ovid

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.