News for hackers. Stuff that matters.
Re:Monadic lifting in C++ by reubenmorais on Sunday March 09, 2014 @11:07PM (#7371102)
For those of you who like me didn't know about this, operators <<= and >>= exist, can be overloaded, and do "bitwise shift assignment".

|a <<= b| is the same as |a = a << b|

Re:Monadic lifting in C++ by jxf on Sunday March 09, 2014 @11:15PM (#7371124)
Does |x| mean something specific here in C++ that I'm not aware of, or are you just using it to bracket the expressions?
Re:Monadic lifting in C++ by adamnemecek on Sunday March 09, 2014 @11:16PM (#7371130)
The latter.
Re:Monadic lifting in C++ by banachtarski on Monday March 10, 2014 @12:00AM (#7371226)
Well, yes that's true, but in the context of "monadic lifting" >>= refers to the monadic bind operator.
Re:Monadic lifting in C++ by adamnemecek on Monday March 10, 2014 @12:02AM (#7371237)
Correct but in order for an operator to be overloadable in C++, it must have a meaning in standard C++ as well. The comment was pointing out that it's surprising that >>= is an operator in standard C++.
Re:Monadic lifting in C++ by banachtarski on Monday March 10, 2014 @12:04AM (#7371244)
Oh my mistake, I actually use >>= and <<= frequently.