However, you do get both to some extent by using something like the _variable convention. You are told what you should be doing, but aren't forced to do it.

But the problem is that some of these conventions, as well as allowing clever people to do clever things, mean that sensible people doing sensible things have problems.

For example if I add a _private_method to Foo module v1.01, and Sally already has a _private_method in her Foo v1.00 subclass then things will break for no good reason when Sally upgrades.

Should Sally have to go read the code before she can subclass a new version? When only "internal" APIs have changed?

Nobody is being idiotic here in my opinion. It's just Perl's broken OO encapsulation getting in the way of real work being done.


In reply to Re^6: Closure objects with public, private, and protected fields by adrianh
in thread Closure objects with public, private, and protected fields by gargle

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.