David H. Adler | 7 Dec 2004 00:09
Picon
Favicon

Re: test whether two arrays are equal

On Sun, Dec 05, 2004 at 10:32:28PM -0600, _brian_d_foy wrote:
> [[ This message was both posted and mailed: see
>    the "To," "Cc," and "Newsgroups" headers for details. ]]
> 
> In article <874qj2w2w9.fsf <at> jidanni.org>, Dan Jacobson
> <jidanni <at> jidanni.org> wrote:
> 
> > Say, is if(" <at> frogs" eq " <at> toads"){} worthy of being added to the top of
> > $ perldoc -q 'How do I test whether two arrays or hashes are equal?'
> > as a "beginners method (that has XYZ pitfalls, whereupon we try instead...)?
> 
> that wouldn't be something I'd ever recommend.

I might be wrong, but I had guessed that the OP had meant that in the
sense of "a beginner might think this would work, so maybe we should
explicitly point out that it doesn't".

Of course, a) I may be wrong and 2) this may be in that blurry area
between the worth-mentioning and the
too-obvious-if-you-actually-read-the-docs camps...

dha
--

-- 
David H. Adler - <dha <at> panix.com> - http://www.panix.com/~dha/
All those quotes make my eyes bleed.
    Michael G. Schwern

_brian_d_foy | 7 Dec 2004 01:42
Picon
Favicon

Re: test whether two arrays are equal

In article <20041206230932.GA12252 <at> panix.com>, David H. Adler
<dha <at> panix.com> wrote:

> On Sun, Dec 05, 2004 at 10:32:28PM -0600, _brian_d_foy wrote:

> > In article <874qj2w2w9.fsf <at> jidanni.org>, Dan Jacobson
> > <jidanni <at> jidanni.org> wrote:

> > > Say, is if(" <at> frogs" eq " <at> toads"){} worthy of being added to the top of
> > > $ perldoc -q 'How do I test whether two arrays or hashes are equal?'
> > > as a "beginners method (that has XYZ pitfalls, whereupon we try
> > > instead...)?

> > that wouldn't be something I'd ever recommend.

> I might be wrong, but I had guessed that the OP had meant that in the
> sense of "a beginner might think this would work, so maybe we should
> explicitly point out that it doesn't".

ah, that would make more sense.  In that case, sending a patch is
much better. :)

--

-- 
brian d foy, comdog <at> panix.com

Dan Jacobson | 8 Dec 2004 00:23
Favicon
Gravatar

Re: test whether two arrays are equal

>> I might be wrong, but I had guessed that the OP had meant that in the
>> sense of "a beginner might think this would work, so maybe we should
>> explicitly point out that it doesn't".
Bingo.
b> ah, that would make more sense.  In that case, sending a patch is
b> much better. :)
By definition beginners don't know how to send patches. So incorporate
that fleeting beginners view, with appropriate cometary of the pros
added, while it's still hot.  By the time I know how to send patches,
the rare glimpse into the beginner's head will be gone. Besides, I
Plus a full patch would imply I already knew the expert commentary
part -- imagine that, an expert still able to come up with beginner
glimpses. Actually in a past life I sent patches. That isn't the point
though.

_brian_d_foy | 9 Dec 2004 05:21
Picon
Favicon

Re: test whether two arrays are equal

In article <87vfbdr8v9.fsf <at> jidanni.org>, Dan Jacobson
<jidanni <at> jidanni.org> wrote:

> >> I might be wrong, but I had guessed that the OP had meant that in the
> >> sense of "a beginner might think this would work, so maybe we should
> >> explicitly point out that it doesn't".

> Bingo.

> b> ah, that would make more sense.  In that case, sending a patch is
> b> much better. :)

> By definition beginners don't know how to send patches.

i don't see how patches has anything to do with beginners.  You
can obviously put sentences and paragraphs together, so rewrite
the part of the answer you think should change, then post it.

Otherwise, it just ends up in my queue with all the other things
that wait for airport layovers.  Things that require less work,
like patching or cutting and pasting, get done faster. :)

--

-- 
brian d foy, comdog <at> panix.com

Dan Jacobson | 9 Dec 2004 07:27
Favicon
Gravatar

Re: test whether two arrays are equal

b> rewrite the part of the answer you think should change, then post it.

OK. Please make this the new result of
$ perldoc -q 'How do I test whether two arrays or hashes are equal?'
Found in /usr/share/perl/5.8/pod/perlfaq4.pod
       How do I test whether two arrays or hashes are equal?

+      For the simplest cases, one might use if(" <at> frogs" eq " <at> toads"){...}.

       The following code works for single-level arrays.  It uses a...

_brian_d_foy | 10 Dec 2004 12:02
Picon
Favicon

Re: test whether two arrays are equal

In article <87y8g83s1f.fsf <at> jidanni.org>, Dan Jacobson
<jidanni <at> jidanni.org> wrote:

> b> rewrite the part of the answer you think should change, then post it.
> 
> OK. Please make this the new result of
> $ perldoc -q 'How do I test whether two arrays or hashes are equal?'
> Found in /usr/share/perl/5.8/pod/perlfaq4.pod
>        How do I test whether two arrays or hashes are equal?
> 
> +      For the simplest cases, one might use if(" <at> frogs" eq " <at> toads"){...}.
> 
>        The following code works for single-level arrays.  It uses a...

I won't be making this change.  I thought you had said that that
method was an example of what not to do, but your one line change
suggests that they use it.  I don't think it improves the answer 
at all.

--

-- 
brian d foy, comdog <at> panix.com


Gmane