The required syntax is actually marginally simpler:
for a != 0 && b != 0 {
}
I very much like Go's explicit use of booleans. One advantage is that
you always know the exact value of any true/false value, so you
can be sure that:
if a && b {
if a == b {
print("ok")
}
}
will always print "ok". In C it may not - you need to remember to do:
if((a != 0) == (b != 0)){
which is sometimes easy to forget.
Having explicit bools makes the language cleaner and easier to
understand IMHO.
That doesn't mean I'm against having an explicit bool to int conversion,
though.
>
> --
> 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...@googlegroups.com.