I am taking another look at PureBasic. I got a little distracted with a big project that I began in powerbasic and had to reach a stopping point before translating. I am there.
I wrote a String Builder C++ class that essentially uses a dynamic string (BStr) inside a UDT. Obvioulsy I can manage this myself, but just curious if PureBasic can do this under the hood for me?
Also, how mature/stable is this language now?
I understand it is mostly a procedural language but what is the current thinking on implementing OOP style coding? Is Inheritance possible?
PureBasic maturity
Re: PureBasic maturity
Purebasic allows dynamic strings within structures (UDT's) as well as fixed length strings etc. Dynamic strings in Purebasic are not BSTRs, but PureB can work with such strings easily enough. Just remember that, if using BSTRs, it is your reponsibility for freeing these strings because PureB's garbage collector will not automatically free them.
As for OOP... PureB supports interfaces and you can easily knock up basic classes by constructing the vTables yourself. I write all of my software using this methodology now as it is clean and very easy to maintain. There are plenty of examples in these forums for doing this. In terms of the compiler supporting OOP, it has been discussed many many times and, well, the creators of PureB have stated on numerous occasions that they currently have no plans to take that path. Basic inheritance is possible through one interface being able to extend another. All of Powerbasic's interfaces inherit from iUnknown and whilst Purebasic does not insist on that, I find it beneficial to do so simply so that my libraries can be used by Powerbasic developers etc.
As for stability, well you will find that there are frequent updates and, subsequently, you will often find Purebasic to be in beta form. However, even when this occurs (such as now with Purebasic 4.4 being in beta) you will always be able to access the previous release version. Personally, I always work with the very latest versions and I find this language to be very stable, at least in those areas in which I work. Bugs which are reported in these forums are never ignored and many are fixed very quickly indeed.
As for OOP... PureB supports interfaces and you can easily knock up basic classes by constructing the vTables yourself. I write all of my software using this methodology now as it is clean and very easy to maintain. There are plenty of examples in these forums for doing this. In terms of the compiler supporting OOP, it has been discussed many many times and, well, the creators of PureB have stated on numerous occasions that they currently have no plans to take that path. Basic inheritance is possible through one interface being able to extend another. All of Powerbasic's interfaces inherit from iUnknown and whilst Purebasic does not insist on that, I find it beneficial to do so simply so that my libraries can be used by Powerbasic developers etc.
As for stability, well you will find that there are frequent updates and, subsequently, you will often find Purebasic to be in beta form. However, even when this occurs (such as now with Purebasic 4.4 being in beta) you will always be able to access the previous release version. Personally, I always work with the very latest versions and I find this language to be very stable, at least in those areas in which I work. Bugs which are reported in these forums are never ignored and many are fixed very quickly indeed.
I may look like a mule, but I'm not a complete ass.
Re: PureBasic maturity
I've yet to run into stability problems. (Except my own, that is
) Using beta's is a different ballgame...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: PureBasic maturity
Hey Mike, good to see you here from the PowerBasic group. Welcome
Srod is definitely the OOP specialist around here. He has posted some really good info on his website. I think you'll find that for most anything that needs doing, if the language doesn't provide a solution directly, someone has figured a way to do it yourself.
Hope you are here for the duration.
Srod is definitely the OOP specialist around here. He has posted some really good info on his website. I think you'll find that for most anything that needs doing, if the language doesn't provide a solution directly, someone has figured a way to do it yourself.
Hope you are here for the duration.
Missed it by that much!!
HK
HK
-
Mike Trader
- User

- Posts: 43
- Joined: Tue Jul 10, 2007 8:09 pm
Re: PureBasic maturity
Thank you. It would be a VERY refreshing change to post in a forum where the moderator is a little more willing to deal with criticism and defend design decsions rather than deleting threads and banning members ala powerbasic forum.
I am interested in the UDT members. It seems that to address a member the / is used rather then the .
so a UDT with a member a would be assigned as SomeUDT/a = 42 rather than SomeUDT.a = 42?
I am interested in the UDT members. It seems that to address a member the / is used rather then the .
so a UDT with a member a would be assigned as SomeUDT/a = 42 rather than SomeUDT.a = 42?
Re: PureBasic maturity
It's a backslash:Mike Trader wrote: so a UDT with a member a would be assigned as SomeUDT/a = 42 rather than SomeUDT.a = 42?
Code: Select all
SomeUDT\a = 42
Code: Select all
Define LongVariable.l
Last edited by Thorium on Sun Sep 13, 2009 8:58 pm, edited 1 time in total.
Re: PureBasic maturity
> so a UDT with a member a would be assigned as SomeUDT/a = 42 rather than SomeUDT.a = 42?
A Backslash \, not a Slash
You're right.
// edit
Thorium is faster
A Backslash \, not a Slash
You're right.
// edit
Thorium is faster
-
Mike Trader
- User

- Posts: 43
- Joined: Tue Jul 10, 2007 8:09 pm
Re: PureBasic maturity
Would there be some clever way to switch those perhaps because all my udts use the dot to specify members ala powerbasic. I can do a find/replace but I am wondering if there is a compiler trick or macro or something that might make it less work to convert the code?
- Fluid Byte
- Addict

- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
Re: PureBasic maturity
Nope. New language, new rules.I am wondering if there is a compiler trick or macro or something that might make it less work to convert the code?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?


