[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Golf (7, er 16 strokes is par!)



Bennett Todd <bet@rahul.net> writes:

> 2000-05-02-11:53:04 Jeff Pinyan:
> > On May 2, Bennett Todd said:
> > >which comes to 14 if I count right. Sure is a shame that there isn't
> > >a ^^ operator, which like && and || would treat its args as booleans
> > >rather than bitstrings. They could have done that when they
> > >introduced xor, but as best I can tell they didn't.
> > 
> > Camel, ed. 2, pg. 94:
> > 
> >   There is also a logical B<xor> operator that has no exact counterpart in
> >   C or Perl, since the other XOR operator (^) works on bits.  The best
> >   equivalent for C<$a xor $b> is perhaps C<!$a != !$b>[1].  This operator
> >   can't short-circuit either, since both sides must be evaluated.
> 
> Thanks for straightening me out, Jeff.

No, thanks to all for straightening *me* out!  People were extremely
polite, especially in view of the fact that my post should *never*
have gone out.  So polite, in fact, that I'm worried the Internet is
broken.

[...]

-- 
Ariel Scolnicov        |"GCAAGAATTGAACTGTAG"            | ariels@compugen.co.il
Compugen Ltd.          |Tel: +972-2-6795059 (Jerusalem)	\ We recycle all our Hz
72 Pinhas Rosen St.    |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555    http://3w.compugen.co.il/~ariels

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe