implicit conversion - Why are non-boolean values not implicitly converted in boolean expressions? -


some programming languages evaluate

5 == true 

to true, or allow

if 5 expr 

by converting 5 bool.

julia not. why?

because == equivalence relation.

in julia, true, when converted integer, becomes 1, , 1 == true. if true == 5, in order == preserve transitivity, imply 1 == 5


Comments

Popular posts from this blog

python - Overwriting the save method of a Django model -

java - how to browse all messages from 2 different MQQueue in the same function? -

How to run C# code using mono without Xamarin in Android? -