<AnyType> = Byte Ptr?
BlitzMax Forums/BlitzMax Programming/<AnyType> = Byte Ptr?
| ||
I'm debugging a lot of code, and I was surprised to find that SuperStrict lets me pass any old Type instance to a function which specifies that it takes a Byte Ptr. ( Return types work the same way. ) It picks me up on other errors like cannot convert from Int to Byte Ptr, etc, but not with a type instance. Is there some value to it allowing this? Because otherwise, it would be nice if SuperStrict helped me find my typos, which is why I use it. HyperStrict?MegaStrict? |
| ||
Catholistrict!!! :) |
| ||
Heh, I like it. Seriously, though, this is a pain in the butt. If people want ( for some reason ) to typecast back and forth between an object and a byte ptr, then make them explicitly cast it, but it shouldn't be implicit to the point where SuperStrict won't find mistakes. That makes a mockery of SuperStrict. |
| ||
You missed a point: numerics are no objects ... thats perhaps the reason they are able to do it implicitely. Objects will fail misserably if they do not have a feature to create a memory block with the data (like string has) |