On 5 May 2017 at 14:11, Michael Jones <michael.jo...@gmail.com> wrote:
> Just so. One cannot do boolean arithmetic with boolean variables.
>
> We have:
>   EQUIVALENCE ("==")
>   XOR ("!=")
>   NOT ("!")  -- George Boole's NEGATION
>
> We lack:
>   AND ("&") -- George Boole's CONJUNCTION
>   OR ("|") -- George Boole's DISJUNCTION
>
> As it happens, one can implement all the operators from the basis of
> NEGATION and either CONJUNCTION or DISJUNCTION, but as we lack each of the
> last two, one must be sure to use ints where bools would be natural.

I don't get it. What's the difference between a&&b
and the hypothetical a&b for two expressions a and b,
assuming a and b are free of side-effects ?

> Obviously Go users have gotten along fine without the two missing operations
> so there may be little argument for it. (Also, with the bool type as Go's
> platypus there is an aura of acceptable inconsistency anyway--since we can't
> take addresses of them* then it could be argued that other differences are
> ok as well.)

I don't get this either - we can indeed take addresses of bool-typed
values: https://play.golang.org/p/L9yxgq_bSj

Apologies for my obtuseness :)

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to