You're thinking like a C++ programmer. It's not so counter intuitive for non-C++ programmers, and actually quite common cause for bugs with inexperienced programmers.
However, I can add a engine property to allow the application developer to choose if these conversions should be allowed or not.
Like Andreas said, it is a cplusplusy thing. As soon as you try out C# you'd find the same thing as AngelScript. ints are not bools and you are making a technical assumption that the value of False is the same as integer zero and True is any other value. (which, for the most part is always right)
it's not only it's a C++ thing, it's also a C thing, a PHP thing, a javascript thing, insert_language_of_your_preference thing.<br><br><!--QUOTE--><BLOCKQUOTE><span class="smallfont">Quote:</span><table border=0 cellpadding=4 cellspacing=0 width="95%"><tr><td class=quote><!--/QUOTE--><!--STARTQUOTE--><i>Original post by midnite</i>As soon as you try out C#<!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE-->I have and I don't think I'll ever come back to it :)<br>
On this subject, one thing that always bugs me off is that some operations with enum defined values generate errors at compile time. We use enums to "feed" the script with all kind of predefined values, many being bitflags, and operating with these bitflags can be pretty ugly at times. Example of compiling:
The negation is a illegal operation. I asume this is cause it tries to negate the enum value itself, so it fails. I use this trick to force it to generate a copy of itself to operate (well, that's my guess):
Then it works. But it's pretty ugly to have to add the cast every time we want to use some of the predefined bitflag constants. Do you think it would be possible/convenient to force it to generate the copy on that kind of operations?