On Mon, 14 May 2007 12:51:53 +0200
Thomas Wittek <[EMAIL PROTECTED]> wrote:

> Reason? I still haven't seen a good justification for sigils.

   This may not qualify as a "good justification", but it is one I've 
   discussed with others and rings true for many.  Take a look at 
   actual code written in other languages and you'll find many variable
   names that end in things like _ary, _array, _dict, _list, etc.  to
   denote the type of container it is. Why?  Because 'foo' doesn't
   tell you what it is, so programmers compensate with 'foo_dict' or
   'foo_array' so they don't have to constantly go looking for the 

   With Perl you get that plainly visible with one single character at
   the beginning of the variable name.  You can differentiate what it
   is easily, in a consistent way, with only one character. 

   Personally, I love sigils for this reason alone.

> To allow arrays and scalars and subs to have the same name (besides
> the sigil) although they have different content? No good idea I think.
> I also can't remember that I ever named a variable like a "reserved 
> word" or operator. And even if I could, I'd consider it to be bad
> style.

   Much like your argument about naming variables after reserved
   words, I see naming an array, scalar, and a sub the same to be
   bad style.

   Frank Wiles <[EMAIL PROTECTED]>

Reply via email to