I have a request for a future update to PureBasic.
I use both PureBasic, and GLBasic, each for different types of projects.
The most recent major update to GLBasic is a feature I have come to like very much.
It now allows Functions inside of Types.
This allows for a (sort of) OOP approach to organizing code, without added complexity.
I find it allows me to make nice, self contained little code objects, which are very suited to re-usability, and still think and write in a procedural way.
Would it be possible to add such a feature to PureBasic.
I know, OOP is entirely possible with Prototypes, Interfaces, Function Pointers, etc.
This proposed method though, while definitely not adhering to all the concepts of OOP, it borrows just enough to be useful, while not becoming cumbersome for amateurs such as myself.
Here is how such an implementation may look (borrowed directly from the new version of GLBasic, but adapted to PureBasic syntax).
result.i = (self\x + self\y) * z
Procedure set(x.i, y.i)
self\x = x
self\y = y
result.i = foo(0)\bar(30)
I understand that Fred is not interested in adding full OOP support to PureBasic, and if this idea is not acceptable, I of course fully understand.
I would be very pleased though of course if it is deemed a good idea, and implemented.
Thanks in advance.