freak, it is not about replacing internal commands. I do this sometimes for bug workarounds by using macros.freak wrote:Replacing a builtin function is not a good idea.
I thought modules are here to prevent naming conflicts, but that's not the case as we learn now. If you write
a game engine module, you may want to add functions like LoadSprite() and LoadSound() to it.
If you write a module for drawing stuff, you want to use Box(), Line(), Circle(), Ellipse() in your module.
A special math module may contain standard functions like Abs(), Sin(), Cos(), Sqr(), Tan(), Log(), Log10(), ...
It is not possible now, because many hundred, common procedure names are reserved by PB already.
Most of this are very commonly used names, used nearly everywhere in the world (math, drawing, ..).
Maybe PB has already over 1.000 commands, I didn't count them.
It is clear in nearly every language that you can't use reserved keywords, so nobody writes procedures like If(), While(), Wend().
Also, this are not very useful names for procedures. Hope you understand what I mean.
Luckily API commands all end with underscore '_', otherwise there would be many more thousands of useful names reserved,
that would conflict with our own module procedures.
Fred added '_' to the end of all API functions to prevent name clashes between API and PB functions (like 'LoadImage'), and now we users have
the same problem inside our own modules. We need to write LoadImage__() now, because LoadImage() and LoadImage_() are already used
and can lead to problems!

In gDrawing I used names like gClear(), gPlot(), gBox(), gRoundBox(), gLine(), gLineXY(), gPie(), gPieXY(), gArc(), gArcXY(), gEllipse(), gEllipseXY(),
gCircle(), gCircleXY(), gBezier(), gCurve(), gClosedCurve(), gTriangle(), gPoly(), gDrawImage(), gDrawAlphaImage(), gDrawClippedImage(),
gDrawText(), gDrawRotatedText(), ...
Now we have to continue doing the same. I really thought modules would fix this problem with always using unique names, because it is a separate "namespace".
Maybe you can re-think that again and find a way to change it little bit, so we are also able to use common procedure names,
even if they are already used by PureBasic. I provided some ideas, and I think using something like "System::" for all PB and API
functions would be really good. This would only be required if there is a name conflict, otherwise you can use PB functions like before.
It is the same if we use two modules from Tips & Tricks from different authors. If there is a name conflict, we can use the full qualified
name, like ts_soft::DoSomething() and freak::DoSomething(). For PB we could use System::LoadSprite() to prevent conflicts with other module names, if they appear.
The situation now is that PB forbids us to use many hundred useful names for our own module functions, and some hundred more will be added in the future, for sure...

Modules could solve this problems, and I think the main reason for developing the module stuff was to prevent such naming conflicts in the future,
with so many thousand users, writing millions of procedures every year...