I had a bug and i couldn’t work it out and it was completely my fault. I started with a float value but eventually changed my system for int and i thought i had changed all checks in all code but i missed one and due to transacts this took a few hours to pinpoint the issue
Head.Data.CubeValue is a int and i was checking = 2.0 which always fails
In the snip the 2 was a 2.0 which would never pass and checking an int to a float isn’t valid so this would always fail. The issue i had is this was numerous functions in and not a visual error hence the amount of time to fix. Unsure if this is intentional as i can think of better ways to ensure an if(): fails so wanted to at least mention it.
That’s just what debugging is for… It’s expected to float = int fail, same as is expected to string = int, and even anything else such as agent = float or any other type.
Adding auto types conversion would be chaos and bad in general (see how javascript is bloated with functionality, conversions, weird and even wrong behaviors). It’s what verse is trying to avoid and one of the goals of the language… In the future, numbers in verse are expected to receive even more types and functionality around them (such as number type that is supertype of int and float, more rational functionality, and possibly even breaking floats and ints into their 32 and 64 bits counterparts)
To avoid the problem you faced in the future, it is better for you to place Print/Log statements on key parts of your code to quickly figure out how the execution is being handled during runtime, avoiding all these hours trying to find where the error is without any clues like you said.
Yea i will deffo rethink about this issue i had if i ever have it again so itll be easy next time i just wanted to share my experience either good or bad suggestion.