On Thu, 17 Oct 2002, John Williams wrote:
> > > : It's rare enough to need bitwise things in Perl 5 (outside golf).
I'm
> > > : hoping that it'll be even rarer in Perl 6, as better interfaces are
> > > : designed for the things which at present require flipping individual
> > > : bits.
> > >
> > > I almost wonder if it's wrong to waste ~ on it...
> > >
> > > That would be an argument for b| and b&, I suppose.
> >
> > That looks like about the best. When rare things get too
punctuation-heavy,
> > people start to get really confused.
>
> I agree. b| and b& are the first operators which look good to me. Most
> of the other proposals look like line-noise, and I would hate to have to
> start agreeing with perl-detractors. Bitand and and bitor work for me
> too.
>
Well, let's look at a few possibilities:
1) if( $vec bit| $mask bit& $mask2 )
2) if( $vec b| $mask b& $mask2 )
3) if( $vec |b $mask &b $mask2 )
4) if( $vec |bit $mask &bit $mask2 )
I think I would have an easier time explaining #4 to someone
(
"What does the 'b' stand for?"
"It stands for 'bit'"
"Why not just write 'bit' then'?" )
Plus, what is '|bit'? It's an 'or' operator primarily, and it's of the 'bit'
flavor. 'Though I'm guessing that asking to have an operator whose first
character is '&' is Perl heresy. I just thought it was interesting to see
what it would look like in code.
-Jonathan Shapiro
This e-mail and any attachment is for authorised use by the intended recipient(s)
only. It may contain proprietary material, confidential information and/or be subject
to legal privilege. It should not be copied, disclosed to, retained or used by, any
other party. If you are not an intended recipient then please promptly delete this
e-mail and any attachment and all copies and inform the sender. Thank you.