I find the arrow perfectly consistent with its use in C and
C++. You use an arrow when you access things through a
reference. A dot when you access things directly. But in
Perl you never really have an object, you have a reference
to it and access it through that reference, which matches
the notation.
For instance if you make a copy of an object, and adjust
that copy, the original changes. If you make a copy of
an object and rebless it, the original is now in a
different class. Those internal details show that
any and all accesses to the object are taking place through
a level of dereferencing. If the data was immediate then
modifying a copy wouldn't change the other copies. But it
isn't immediate and so changes are shared among all
references to that object.
That said, Perl 6 is doing a lot to reduce how much the
programmer needs to think about explicitly dereferencing
data structures. Therefore it makes sense to me to have
the arrow change to a dot to indicate the fact that we
are supposed to stop thinking so much about dereferencing...
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.