Re: Accepted abbreviations

2005-04-24 Thread konovalo

   arefarray reference
   boolboolean
   const   constant
   elemelement
   err error
   fh  filehandle
   funcfunction
   hrefhash reference
   int integer
 

interp   interpreter
i   iterator?
   kv  key/value
   num number
   obj object
   op  operator, operation
   r   read(able)
   ref reference
   regex   regular expression
 

expr   expression
   rw  read/write
 

ro   read-only
   str string
   sub subroutine
   w   write(able)
 

in   input
out   output
io   input/output
mem   memory
os   operating system
anon   anonymous
interestingly, among references there are aref and href, but scalar and 
subroutine references are not presented.

Vadim


Re: Accepted abbreviations

2005-04-24 Thread Juerd
konovalo skribis 2005-04-24 10:24 (+0400):
 interp   interpreter

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 singleletterref yet. Probably
because sref would be highly ambiguous.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: Accepted abbreviations

2005-04-22 Thread Aaron Sherman
On Fri, 2005-04-22 at 07:46, Juerd wrote:
 Can we together compile a list of accepted abbreviations, so they can be
 consistently applied?

Are you suggesting that these are accepted by the compiler or by us (for
discussion)?

 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
that assumption.

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 [EMAIL PROTECTED]
Senior Systems Engineer and Toolsmith
It's the sound of a satellite saying, 'get me down!' -Shriekback




Re: Accepted abbreviations

2005-04-22 Thread Juerd
Aaron Sherman skribis 2005-04-22 10:00 (-0400):
 On Fri, 2005-04-22 at 07:46, Juerd wrote:
  Can we together compile a list of accepted abbreviations, so they can be
  consistently applied?
 Are you suggesting that these are accepted by the compiler or by us (for
 discussion)?

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
bit harder.

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
itself.

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
provide consistency.

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.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: Accepted abbreviations

2005-04-22 Thread Juerd
Juerd skribis 2005-04-22 16:11 (+0200):
 Those are for identifiers, so we don't end up with one function using :r
 and another using :read. That'd be inconsistent.

Although readline should not be made rline, and I still think both :r
and :read should work!

Bool +$read is shortr

or preferrably with even simpler syntax:

Bool +$read|r


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html