04-11-2023, 11:31 PM
That's why I mentioned it's best to just forget that $NoPrefix exists. Even in Bplus's example here, he has a Sub called MessageBox. By itself, it doesn't conflict with anything in QB64. Once $NoPrefix is added into the mix though, it errors out as there is a command called _MessageBox (and the no prefix version of it would be MessageBox).
$NoPrefix is just asking to open a can of worms to make your code hard to maintain and preserve for longevity's sake. For ages, I've had a SaveImage library which I've shared for folks to use. If QB64 adds a _SaveImage command in a year or so, there wouldn't be any issues or compatibility problems as there'd be a difference in the underscored and reserved QB64 command, verses my personal routine. Once $NoPrefix enters the situation, however, then all sorts of problems poop up, requiring a rewrite of something to resolve the conflict.
Personally, I'm just never going to use $NoPrefix, nor ever code with it, and if there's an incompatibility with one of my routines or libraries due to it, I'm leaving it up to the end-user of that library to sort it out and deal with it. $NoPrefix compatibility isn't anywhere on my list of things of even considering when coding. The underscores are there in QB64 keywords to prevent any issues from arising like such, and if someone wants to sidestep those protections just to save typing a bit, then I feel its on them to sort out the conflict and not me.
$NoPrefix is just asking to open a can of worms to make your code hard to maintain and preserve for longevity's sake. For ages, I've had a SaveImage library which I've shared for folks to use. If QB64 adds a _SaveImage command in a year or so, there wouldn't be any issues or compatibility problems as there'd be a difference in the underscored and reserved QB64 command, verses my personal routine. Once $NoPrefix enters the situation, however, then all sorts of problems poop up, requiring a rewrite of something to resolve the conflict.
Personally, I'm just never going to use $NoPrefix, nor ever code with it, and if there's an incompatibility with one of my routines or libraries due to it, I'm leaving it up to the end-user of that library to sort it out and deal with it. $NoPrefix compatibility isn't anywhere on my list of things of even considering when coding. The underscores are there in QB64 keywords to prevent any issues from arising like such, and if someone wants to sidestep those protections just to save typing a bit, then I feel its on them to sort out the conflict and not me.