PureBasic Object Oriented

For everything that's not in any way related to PureBasic. General chat etc...
coco2
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: PureBasic Object Oriented

Post by coco2 »

Infinity is life
User avatar
Erolcum
User
User
Posts: 51
Joined: Fri Jun 07, 2024 10:45 am
Location: Turkiye
Contact:

Re: PureBasic Object Oriented

Post by Erolcum »

coco2 wrote: Sat Sep 07, 2024 10:04 am Infinity is life

Code: Select all

Repeat 
  if infinity = life
    break
  endif
forever ; PB has infinity  :) 
; go on living life, take a coffee for yourself
You may visit my new Purebasic blog here..
:arrow: https://erolcum-github-io.translate.goo ... r_pto=wapp
coco2
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: PureBasic Object Oriented

Post by coco2 »

Code: Select all

if life = infinity
  return hell
endif
; get absorbed into reality, welcome to ZOMBO.COM
Little John
Addict
Addict
Posts: 4775
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PureBasic Object Oriented

Post by Little John »

It looks like PureBasic urgently needs to be converted to an infinity-oriented language. :mrgreen:
coco2
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: PureBasic Object Oriented

Post by coco2 »

I hereby agree to coin the new term infinity-oriented language
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PureBasic Object Oriented

Post by idle »

To infinity and beyond!
Image
User avatar
mk-soft
Always Here
Always Here
Posts: 6202
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PureBasic Object Oriented

Post by mk-soft »

I have worked a lot with OOP and only with Purebasic I understood how OOP works and how computing power and memory intensive it is.

With a little effort it is also possible to programme OOP with Purebasic. There are courses and many examples in the forum. Even the PB IDE uses some OOP.


Google Search: "oop site:purebasic.fr"
Link: ActiveScript with Purebasic
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
threedslider
Enthusiast
Enthusiast
Posts: 377
Joined: Sat Feb 12, 2022 7:15 pm

Re: PureBasic Object Oriented

Post by threedslider »

I have first started in OOP C++ in long time, it is very powerful and doing whatever you want it :) Seeing in examples big company use C++ and also C too.

Main reason for OOP is more secure than C, C is easy thought but in some degree of complexity it is hard to maintain all code at once, you have a great power and responsibility. But why OOP ? Because OOP manages more easily in complexity with objects, it can reuse, to locate to error, better visually in objects for construction in system, etc... In complex code it is more easy to maintain because of classes splitting to little things

A lot of programmers are afraid from C++ because it is very verbose and no clue idea of what classes on how they work between them...

I love PB too, I have done with my raytracer from C++ to translate at PB :wink: It is a no problem for me.

So talking OOP compare to procedural programming, that doesn't make sense, procedural programming is a technical and OOP is another technical with several paradigm style...

And don't be afraid of OOP as procedural programming as well.

If PB integrates with OOP so it will be great too but keep procedural programming too as C++ with C :mrgreen: No downside but just more the possibility and more choice ...

That a thing is still good PB was it understand the code C++ by wrapping with C :shock:

Don't make me wrong, I love both OOP and procedural programming, I am saying it :P
User avatar
le_magn
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Aug 24, 2005 12:11 pm
Location: Italia

Re: PureBasic Object Oriented

Post by le_magn »

PB must remain procedural, I'm fine with it as it is, if you like oop so much there are several examples in the forum on how to do it with purebasic or otherwise you can move directly to an OOP language and you will finally achieve infinite happiness
Image
Rinzwind
Enthusiast
Enthusiast
Posts: 679
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: PureBasic Object Oriented

Post by Rinzwind »

Fred could add a few tiny optional features to the structure type and we come a long way to simplify the implementation of the object idea in PB. But won't happen.
viewtopic.php?t=75529
User avatar
Piero
Addict
Addict
Posts: 863
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: PureBasic Object Oriented

Post by Piero »

I must say I was fascinated by AppleScript (it was even "better" years ago…) the moment I discovered it

repeat with i in mylist

set a to items of desktop whose name contains "pure fred"

Post Reply