PureBasic Love hate relationship

For everything that's not in any way related to PureBasic. General chat etc...
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

PureBasic Love hate relationship

Post by kake26 »

Hi all,
I've always debated which is better PureBasic or FPC(Free Pascal). I mean PureBasic is a good lang and cross platform. Even with 3.94 I've seen more functionality ported to Linux under PB. It still can't make Linux libs though and thats a bit annoying. Then I'm faced with which do I use since PB is a great lang, but FPC is has more units and things for such as zlib,mysql,pgsql. Granted ODBC works and can be used under Linux/Unix via UnixODBC. PureBasic also seems to play better with C code than FPC usually. However there is allot of stuff that FPC can do that PB can't, unless you write the code needed to do it by hand. I've written a interprerter in PB already and to me that says alot of good things about PB. However I've decided to create another one and tried it in PB and have found it to not be so easy as it would be with FPC. Bottom line I'm stuck in a love hate relationship with PB and its driving me nuts. There are days where I hide in the PB IDE and others when I hide in a console window coding FPC. It bothers me that I can't make up my mind. Consider this the irrelvant thought for the day.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

It is simple, if you think FPC has something that PB doesn't, you could ask here and maybe you get an answer and then continue working with PB unless FPC crashes your mind again.

It's like mixing oil with water, you can after that extract the oil and have the water without oil :D
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

PureBasic v4.00 should put your mind at ease. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

wooohoo! I look forward to it. 3.94 was a big improvment over previous version so I have high hopes.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

PB isn't OOP hehe OLD SCHOOL so OLD SCHOOL. I like OLD school though.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

Pound for Pound FPC is superior to PB in the end. PB will evelove nicely though, but it has much a way to go. I'll still use it cause I mean I bought it so to not use it would be a waste.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: PureBasic Love hate relationship

Post by PB »

> there is allot of stuff that FPC can do that PB can't, unless you write the code needed to do it by hand

In other words, PureBasic can do what FPC does. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

well only half way since PB can't do any OOP stuff.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

... which is great :-)
( 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... )
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

yes, no oop, great :)
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Berikco wrote:yes, no oop, great :)
no thats bad! :D
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

I'm gonna agree with thefool that is bad. Now I realize I'm crazy, but still I say I'm allowed to be a bit over the top. I used to hate OOP myself and the I discovered some of its very unique advantages, like class inheritiance and I was hooked I got over the initial eww its bad. Its infact a good thing, a very good thing. Please note this will not stop or discourage me from using PureBasic at all, but has been things for me toconsider when starting a new project. To each his own I suppose.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

you are wrong!

PB can do OOP look in the CodeArchiv, there are examples on using OOP with PB.

You can do Object(0)\Move(x, y) I'm sure about it!

:? Or am I sure? :lol:

EDIT:

Code: Select all

; PureBasic Chat
; Author: Danilo (updated for PB3.93 by ts-soft)
; Date: 10. January 2004


;- CLASS cTEST  start
  ; cTest CLASS Interface
  Interface cTEST
    Procedure1.l()
    Procedure2.f(String$)
  EndInterface

  ; cTest CLASS Object
  Structure cTEST_OBJ
    VTable.l
    Functions.l[SizeOf(cTEST)/4]
  EndStructure

  Procedure.l cTEST__Procedure1(*this.cTEST)
    MessageRequester("INFO","Procedure 1 in cTEST")
    ProcedureReturn 12
  EndProcedure

  Procedure.f cTEST__Procedure2(*this.cTEST, String$)
    MessageRequester("INFO",String$)
    ProcedureReturn 123.456
  EndProcedure

  ; cTEST CLASS Constructor
  Procedure cTEST()
    ; Function table
    *object.cTEST_OBJ = AllocateMemory(SizeOf(cTEST_OBJ))
    If *object=0: ProcedureReturn 0: EndIf ; memory allocation failed

    *object\VTable  = *object+OffsetOf(cTEST_OBJ\Functions)
    *object\Functions[0] = @cTEST__Procedure1()
    *object\Functions[1] = @cTEST__Procedure2()
    ProcedureReturn *object
  EndProcedure


;- Program Start
*obj1.cTEST = cTEST()
If *obj1
  Debug *obj1\Procedure1()
  Debug *obj1\Procedure2("Hello World !")
EndIf
Well? day-dreamers, it's time to wake up!
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Like we didnt know ;)
But that doesnt make pb an oop language.. Do some research!

first of all, it would need to have easy access to do such stuff.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

I understand such as: Window\Close(hWnd)
or like Object\Create(hObj)

without declaring so much things..
Maybe there is already a good language like PB that does that?

VB?
Post Reply