Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] [sympa-commits] sympa[10314] trunk/src: [dev] use plain english names for magic variables

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Guillaume Rousse <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] [sympa-commits] sympa[10314] trunk/src: [dev] use plain english names for magic variables
  • Date: Mon, 03 Mar 2014 16:22:32 +0100

Le 03/03/2014 04:04, IKEDA Soji a écrit :
Hi,

For example someones can prefer to $!, OTOH others $ERRNO or
$OS_ERROR.

I feel nice to use English names for rarely used variables.
However, what means "rarely used" may be differ from one another.

So I'll propose as below ---

A) $_ and @_ :

Use non-English names everytime.

Never use $ARG and @ARG.
OK for me. Actually, I didn't even realized the had aliases, I'm myself biased.

B) Other variables "mnemonic" of them are described in perlvar(1) :

May use English names along with non-English names, however, if
multiple English names are given, only shortest one may be used.

e.g. $! and $ERRNO may be used but not $OS_ERROR.
Anyone shouldn't blame use of $ERRNO and others shouldn't blame
use of $!.
I disagree: why should we allow both forms to coexist ? What would we gain ?

Other examples (imcomplete):
$" $$ $( $) $0 $; $< $> $& $` $' $+ $, $. $/ $\ $| $! $? $@

C) Others :

Use English names if any.

e.g. Use %LAST_MATCH_START but not %-.
Better advice: get rid of it completly, because of performance impact.


e.g. We use $^M, because there are no English alternatives.

e.g. We use $], because some versions of Perl don't have
$OLD_PERL_VERSION.

--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.19+.

Top of Page