<Flame-On!>

It also seems like a problem that could be fixed with some additional smarts added into the compilation phase.

So, you want the compiler to pick up the slack that you're causing because you want to use a syntactic arrangement that has been deprecated? How falsely Lazy.

In any case, I've seen indirect notation used successfully in too many tens of thousands of lines of OO Perl to be convinced that it's "a failed experiment".

Ahh ... the old "I've-never-seen-it-fail-so-it-can't-fail" argument. Reminds me of the recent poll regarding favorite logical fallacies. I think I would've voted for this one. Arguing from personal experience is one of the worst arguments one can make, primarily because it's so seductive and it's almost valid. Even if you have read every single line of Perl code that has ever been written, you still would not be able to conclude that the IO notation is ok to use. It would still be a hypothesis. Maybe, it starts to approach "theory" status, but it's not "Law" status.

The only way to achieve "Law" status is to mathematically prove that the IO notation will work correctly in all instances. Unfortunately for your attempt, the counter-example has already been demonstrated. Sorry bout your luck!

"new" is not a keyword. As a method, it cannot use prototypes. The IO notation exists solely as a hack to ease the transition for C++ and Java developers. Larry has said that he wishes the hack had never been approved. Good'nuff for me.

As for it working in most cases ... to me, that's a testament to the skill of p5p and the flexibility of Perl, not an argument for whether or not the feature isn't a mis-feature.

<Flame-Off!>

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.


In reply to Re7: OO style: Placement of "new" by dragonchild
in thread OO style: Placement of "new" by crenz

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.