Cute. I think we're better off without it though; the use cases I can
think of for "generic booleans" are all way too clever.

FWIW, the uses of "generic booleans" I've seen in the wild don't
actually work with your proposal, because they really do need to
overload `and` and `or`, not just `not`. But this is getting off into
the weeds.

Quoting Eric Raymond (2018-10-16 00:17:19)
>    On Monday, October 15, 2018 at 11:32:23 PM UTC-4, Eric Raymond wrote:
>
>    Fair enough.�  I am completely willing to discard the possibility of
>    overloading && and ||
>
>    A little thought showed me that this is not required.
>    The straightforward way to write the contract of "!" would be that it
>    is a monadic function of any type returning true if the operand is the
>    zero value of that type and false otherwise.�  It follows that for
>    types with "implements !" the expression a && b expands to this:
>    if !!a {return !!a} else {return !!b}
>    If we want to be more Pythonic and remove the requirement that it
>    return bool
>    if !!a {return a} else {return b}
>    provided a and b are the same type.
>
>    --
>    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 [1]golang-nuts+unsubscr...@googlegroups.com.
>    For more options, visit [2]https://groups.google.com/d/optout.
>
> Verweise
>
>    1. mailto:golang-nuts+unsubscr...@googlegroups.com
>    2. https://groups.google.com/d/optout

-- 
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