Real quick:

On Wed, 16 Aug 2000, John Porter wrote:

> grep() always treats its "second" arg as a list, even if it's a scalar,
> or some other list-of-one (or none); and grep() always returns a list,
> even if it's a list of one (or none).

True on the first part, false on the second. In scalar context, grep
returns the number of times the block or expression evaluated 'true'.

> Highlander variables acknowledge the fact that all variable types (scalar,
> array, hash) are simply objects.  Objects of different classes, sure; but
> still just objects.  You get no visual help in cases like

When I said 'highlander' I meant one variable per variable name. Please
read RFC9.

> Analogously, for variables of (perl) class "array", you need to know
> that "push" is a method, and that
> 
>       push var, things;
> 
> does what you know it does.  It doesn't help anyone to write "@var".

This is true. But you'll notice that in each of my examples I asked
questions where the context was ambiguous, and not implicit like C<push
var>.

In your example, it WOULD help to write C<@things>, because from a
"birds-eye view" a programmer would see the C<@> and move to the next
line, not pausing to read all the way through to see that C<things> is
obviously plural. Again, I refer you to Dan Sugalski's message about this.

> You are asking wrong/unnecessary questions, and getting wrong answers.

That was disturbingly Zen. ;-)

--
Mike Pastore
[EMAIL PROTECTED]

Reply via email to