Why would
I rather use dots? Because I came to Perl from C++ (believe it or not) where the "->" is used to access members and methods of a pointer to an object; the "." is used when you have the object itself. So when I came to Perl, and
eventually used references, the arrow notation sort of made sense, since references are kinda like pointers. And the same goes for objects... but, wait... objects are references, so does that make them like pointers or objects?
I understand why Perl had to use something other than "." since it differentiated between string addition and numeric addition. However, every other language found some way to use "." for objects. Why not Perl? And it has. I like this new approach, because it is consistent with the approach taken by many other languages. And I like that idea. That is why I am in favor of it.
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
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.