Page 1 of 2
PureBasic Object Oriented
Posted: Fri Sep 06, 2024 5:25 am
by coco2
I wonder if Fred you would reconsider making PureBasic object oriented. So many good things are object oriented. Even our universe.
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 5:55 am
by idle
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 7:51 am
by plouf
Why people dont use search feature here
This is discussed so many times....
And NO objectoriented is not always (or never)better
We like purebasic as is ...
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 8:35 am
by coco2
He might change his mind though. He's a genius.
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 11:28 am
by the.weavster
Object oriented programs are offered as alternatives to correct ones...
- Edsger W. Dijkstra
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 11:41 am
by Caronte3D
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 11:51 am
by TI-994A
There is already a slew of programming paradigms in computing today, presumably with many more to come, each loaded with its own strengths and weaknesses.
Let's enjoy them as God intended them, and keep them
Pure! 
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 1:07 pm
by Little John
coco2 wrote:
I wonder if Fred you would reconsider making PureBasic object oriented.
There are more than enough object oriented programming languages to choose from.
In contrast to those, PureBasic fortunately doesn't make things more complicated than necessary.
the.weavster wrote:
Object oriented programs are offered as alternatives to correct ones...
- Edsger W. Dijkstra

Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 1:19 pm
by BarryG
coco2 wrote: Fri Sep 06, 2024 8:35 amHe might change his mind though.
No, he won't. Read what Fred and Freak have both said in the past -> viewtopic.php?p=484965#p484965
This topic needs to be locked. It's repeating what's been discussed a million times before.

Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 2:25 pm
by swhite
Hi
When I first started using PB some years ago I also thought Object Orientation would be useful. However, over the years I have come to appreciate the fact that PB is not Object Oriented. I use Object Oriented languages in my work and it is far more complicated tracking down bugs through Object hierarchies etc.
If you want object oriented you can create your own framework for this in Purebasic but to me that is a lot of effort for little gain considering all the amazing things you can do in Purebasic already. I would rather Fred spend his time fixing bugs and adding useful features to Purebasic. I appreciate the fact that Fred has been busy producing all kinds of bug fix versions lately which he would not have time for while developing Object Orientation etc.
Simon
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 2:32 pm
by Quin
Fully agreed with Simon. When I first started with PB almost 5 years ago, I too was annoyed at the lack of OOP. But what do you know, years later and I'm now 100% sold on the PB way

Hacking together an OOP system in PB truly isn't that hard, you can use Structures to get you a lot of the basics with function pointers and the extends keyword.
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 3:18 pm
by Thorium
The procedural design of PureBasic is one of the main reasons i still use it.
OOP was a huge step in the wrong direction in general. In the last few years a lot more people understood that and shifting to different paradigms.
For game development it's the data driven paradigm, which separates code and data and does not throw them together in objects, because doing so is just a abstraction which complicates things and slows down the code.
Functional programming also got a lot of traction as it promises much more reliability.
Than we got all the concepts which focus on security, memory save languages are huge right now.
Re: PureBasic Object Oriented
Posted: Fri Sep 06, 2024 8:37 pm
by fsw
Don't remember how many times this was discussed in the last 20 years, and Fred always said:
[french_accent]
NO WAY!
[/french_accent]
If I remember correctly Fred comes from the
asm world, not the Smalltalk world.
In my younger programming life I was in the OOP camp as well, but time has told has me that more programming problems are solved with procedural code rather than oop code.
Newer programming languages have stuck to the procedural paradigm or have some sort of multi-paradigm, where some object oriented stuff from object oriented programming languages or functional stuff from functional programming languages is adopted, but in a smart way.
Best examples are Go, Odin and V.
Strangely enough, new programming languages also have a C-like syntax (or Python

like Mojo did...) not BASIC or Pascal.
So, in this regard PureBasic stands out as having a BASIC/Pascal syntax, which IMHO is a good thing.
Didn't use PureBasic for a few years, but recently I started using it again for small tools or for quickly trying out ideas...
Re: PureBasic Object Oriented
Posted: Sat Sep 07, 2024 9:29 am
by coco2
Only object oriented programming allows infinities. We need infinities to progress.
To add infinities you need to allow the object to be resolved to another object within a time frame. This means the one object converts it's contents to another object without changing anything except the time related variables in it. The new object is stored and the old one is discarded. This is repeated until the object reaches a flag of infinity. The flag is triggered by knowing that the time components are equal.
Re: PureBasic Object Oriented
Posted: Sat Sep 07, 2024 9:56 am
by Erolcum
Was the point of wanting oop infinity ? There is no infinity in life, so what do you need it for? Besides, there is an oop pbi as I know for PB. One of the reasons I like PB is that it's not oop.
Bye bye oop, welcome PB

is written on top in my
https://github.com/erolcum page