Request: Disable implicit Int <-> Obj conversions
BlitzMax Forums/BlitzMax Programming/Request: Disable implicit Int <-> Obj conversions
| ||
Would it be possible to add a compiler directive (similar to Strict), which would disable implicit Int <-> Obj conversions, so:Global image=LoadImage(filename) Would not be allowed. This well-meaning 'feature' has caused me a few headaches and it would be nice to be able to turn it off. StrictTypes maybe? |
| ||
how about just adding it into strict? |
| ||
This is no implicit casting. This is to allow procedural programming for those who want to program in the "old blitz way". It activates an automatic system for handling which for example gives access on the release command. |
| ||
I'd like to see this ditched so that there will be less confusion about freeing resources. At the moment, people (specifically, new users) would think Release released any data type (other than the normal ones like Int, Long, etc.) and that FlushMem was something completely useless. Not to mention that the documentation barely helps in making this clear for new users. |
| ||
This is to allow procedural programming for those who want to program in the "old blitz way". Hopefully Mark can clarify this. In any case, I would like to see an option to disable it. In order to perform this kind of conversion in 'extra-strict' mode: global img=(int)LoadImage(fileName) |
| ||
When you declare the varibles you should also specify there :type. That should help you get away from these errors. For example;Global image:TImage=LoadImage(filename) |
| ||
When you declare the varibles you should also specify there :type. That should help you get away from these errors. For example; I think you misunderstand me. I would like the compiler to *force* me to specify the type, and throw an error if I forget. |
| ||
I basically agree with this, especially for Strict mode. |
| ||
I'd also like to see this. I've stumbled over it too. |
| ||
Hi, Yes, this will happen soon - has caught yours truly out a few times too! |
| ||
Cheers, thanks Mr Sibly! |