I'll begin with the most basic ones:
aref array reference
href hash reference
op operator, operation
regex regular expression
Some may be source of discussion, in which case I think it's better to
pick one -perhaps against someone's preference- than to use a dozen
abbreviations for the same thing. One such example is "regex", which
used to be spelled by most as "regexp". (Yes, I know we're using rules
Although readline should not be made rline, and I still think both :r
and :read should work!
Bool +$read is short<r>
or preferrably with even simpler syntax:
Are you suggesting that these are accepted by the compiler or by us (for
> Some may be source of discussion, in which case I think it's better to
> pick one -perhaps against someone's preference- than to use a dozen
> abbreviations for the same thing. One such example is "regex", which
> used to be spelled by most as "regexp". (Yes, I know we're using rules
> now... :).)
This makes it sound like you mean us, not the compiler. I'll work with
You can decide to use whatever you like, but if you're honestly
expecting that people participating in this mailing list are going to
use your favorite abbreviations, you're the kind of person I think we
should have more of in the world: optimists (opmst for short). ;-)
Seriously, do any of us have a hard time making out what someone means
if they say "regexp" vs "regex"?
What's more, I'd rather you didn't w comments with single-letter
abbreviations, as it would make it much harder for me to r.
Aaron Sherman <a...@ajs.com>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback
By us. Mostly for the purpose of choosing identifiers (str, and thus
substr, not substring), but also for discussion (we talk about subs, not
subroutines) and perhaps documentation.
See below for further clarification.
> You can decide to use whatever you like, but if you're honestly
> expecting that people participating in this mailing list are going to
> use your favorite abbreviations, you're the kind of person I think we
> should have more of in the world: optimists (opmst for short). ;-)
No, it's not to change the world. But whatever ends up in the official
thing, should be consistent throughout. And for that, we need consensus.
Because it can take a long time before people agree, I think we should
begin as early as possible.
Using identifiers consistently also helps when reading example code. For
example, $fh is immediately clear, as are $dbh and $sth. But when
someone uses $handle, $connection and $statement for these, it gets a
Learning something is easiest when in the explanation of one thing, you
recognise parts of something you've already seen. And for that, you need
consistent documentation, along with consistent usage in the language
To provide one example: a few years ago I had a very hard time trying to
figure out what 'ary' stood for, simply because in the lots of Perl
documentation and code, I had not seen it before.
Things that come naturally for experienced programmers can be very
intimidating for beginners, and wherever we can, I think we should
Of course I'm NOT saying that we should start considering one of regex
and regexp wrong. When it comes to reading, both are equally good and
recogniseable to everyone subscribed to this mailinglist. But many
beginners wonder what the p in regexp stands for!
> What's more, I'd rather you didn't w comments with single-letter
> abbreviations, as it would make it much harder for me to r.
Those are for identifiers, so we don't end up with one function using :r
and another using :read. That'd be inconsistent.
I should have been clearer when I sent the initial list. I'm not trying
to change the world. Sorry about that.
> kv key/value
> num number
> obj object
> op operator, operation
> r read(able)
> ref reference
> regex regular expression
> rw read/write
> str string
> sub subroutine
> w write(able)
os operating system
interestingly, among references there are aref and href, but scalar and
subroutine references are not presented.
I don't recall having seen that used.
> i iterator?
Used as such, but I think discouraging i in favour of iter is a better
idea, because i is also often used as index.
> anon anonymous
Is this used?
> interestingly, among references there are aref and href, but scalar and
> subroutine references are not presented.
Because I have never seen them used as <singleletter>ref yet. Probably
because sref would be highly ambiguous.