On 11 September 2017 at 17:56, CampNowhere wrote:
> I am a C developer and am trying to pick up Go.
>
> My question is this. C doesn't "care" about truthfulness, it just cares
> about zero and non-zero when evaluating a logical AND operator. So something
> like the following in C is totally kosher
On Monday, September 11, 2017 at 7:25:54 PM UTC-6, Michael Jones wrote:
>
> int(boolvalue) could mean 0 for false and 1 otherwise
> bool(intvalue) could mean false for 0 an true otherwise
>
> quite a useful notion
>
Yeah, too bad that was shot down years ago (cf. proposal: support
int(bool) conv
On Mon, Sep 11, 2017 at 09:56:59AM -0700, CampNowhere wrote:
> I am a C developer and am trying to pick up Go.
>
> My question is this. C doesn't "care" about truthfulness, it just cares
> about zero and non-zero when evaluating a logical AND operator. So
> something like the following in C is t
That said:
int(boolvalue) could mean 0 for false and 1 otherwise
bool(intvalue) could mean false for 0 an true otherwise
quite a useful notion
On Mon, Sep 11, 2017 at 5:12 PM, Shawn Milochik
wrote:
> Go is more explicit than C. Mistakes won't compile. Perfectly valid syntax
> in C could be a s
Go is more explicit than C. Mistakes won't compile. Perfectly valid syntax
in C could be a subtle logic bug; Go tries to avoid these.
--
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
I am a C developer and am trying to pick up Go.
My question is this. C doesn't "care" about truthfulness, it just cares
about zero and non-zero when evaluating a logical AND operator. So
something like the following in C is totally kosher:
int a = 10;
int b = 20;
while(a && b)
{
do_somethi