Implicit conversion to bool
Posted: Fri Mar 22, 2013 7:25 am
In C they didnt have bool type so they have made implicit conversions to bool in control statements like:
In C#/Java they have removed that conversions, but Cobra doesn't. It is shorter syntax, but it is less clear and doesnt read naturally in english So I think Cobra have made things worse here. What do u think?
- Code: Select all
while(length) // length is integer
{
}
if (car) // car is a pointer
{
}
In C#/Java they have removed that conversions, but Cobra doesn't. It is shorter syntax, but it is less clear and doesnt read naturally in english So I think Cobra have made things worse here. What do u think?