Page 2 of 2

Re: PureBasic Object Oriented

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

Re: PureBasic Object Oriented

Posted: Sat Sep 07, 2024 10:42 am
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

Re: PureBasic Object Oriented

Posted: Sat Sep 07, 2024 10:47 am
by coco2

Code: Select all

if life = infinity
  return hell
endif
; get absorbed into reality, welcome to ZOMBO.COM

Re: PureBasic Object Oriented

Posted: Sat Sep 07, 2024 12:53 pm
by Little John
It looks like PureBasic urgently needs to be converted to an infinity-oriented language. :mrgreen:

Re: PureBasic Object Oriented

Posted: Sat Sep 07, 2024 1:46 pm
by coco2
I hereby agree to coin the new term infinity-oriented language

Re: PureBasic Object Oriented

Posted: Sat Sep 07, 2024 10:48 pm
by idle
To infinity and beyond!
Image

Re: PureBasic Object Oriented

Posted: Sun Sep 08, 2024 9:57 am
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

Re: PureBasic Object Oriented

Posted: Sun Sep 08, 2024 11:39 pm
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

Re: PureBasic Object Oriented

Posted: Wed Sep 11, 2024 4:56 pm
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

Re: PureBasic Object Oriented

Posted: Thu Sep 12, 2024 9:03 am
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

Re: PureBasic Object Oriented

Posted: Thu Sep 12, 2024 11:47 am
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"