not Rob but rather Ian... (6/22/2012) https://mail.google.com/mail/u/0/#label/go%2Fgolang-nuts/FMfcgxwBTsjnkHgqhvQfLqrXsJdHZRxC
On Sat, Jan 5, 2019 at 7:52 PM Michael Jones <[email protected]> wrote: > I brought it up early on, wanting AND (&) and OR (|) as well as AND-ASSIGN > (&=) and OR-ASSIGN (|=). > > Not enthusiastic about shortcut operators on assignment form. > > Rob posted here that he was ok/open to the idea. > > On Sat, Jan 5, 2019 at 5:55 PM Caleb Spare <[email protected]> wrote: > >> Sometimes when working with bools I wish I could write >> >> myBool &&= x >> >> rather than >> >> myBool = myBool && x >> >> I believe that && and || are the only binary operators in the language >> for which the assignment form makes sense but doesn't exist (i.e., we >> have +=, &^=, >>=, and so on). So in some sense adding these last two >> operators would be symmetric and would make working with bools just as >> convenient as working with integers, floats, bit fields, etc. >> >> Has this been discussed before? It's hard to search for this. >> >> Caleb >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > > *Michael T. [email protected] <[email protected]>* > -- *Michael T. [email protected] <[email protected]>* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
