You have a point – the bool function is meaningless and should be deleted. If you want to turn a value into a boolean, there are many specific ways to do so.
> On Apr 5, 2014, at 6:21 PM, [email protected] wrote: > > > bool(5) is true > and bool(0) is false > (and bool(None) doesn't work in contrast to python) > > So in Julia, C, and Python it is the same. > > But unfortunately the "if" statement in Julia does not make the boolean > conversion. > > >> I know that `if 5` works in Python and in C. Many languages choose to make >> `0` ¨truthy¨ and all other values ¨falsey¨, meaning that they are used as >> true/false despite not being booleans. It is by design that this doesn't >> work in Julia. >> >> -- Leah
