OOP in PB?

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

Lets make one thing clear: Purebasic supports objects.

When you working with Windows and Controls, you are working with objects.

When you work with Files and Directories, you are working with objects.

The way in which PB does this is quite ingenious, and the longer you use the language the more you come to appreciate the cleverness of it.

When working with PB I can build complicated object structures with just a few commands.

When working with PB I never worry about memory leaks, without any of the expensive overhead needed for garbage collection.

I've spent a lot of time looking at adding an OO syntax to PB, but the conclusion I have come to is that I don't need it.
Last edited by GedB on Fri Feb 09, 2007 10:21 am, edited 1 time in total.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Hroudtwolf wrote:
Shocked What? everyone who uses C is a noob?
Hey, we don't want to have this moment a world championship in splitting hairs ;-)
You started it with broad sweeping statements that aren't true.
hellhound66 wrote:@C programmers post:
One, who uses C is a veteran, a freak or a bloddy beginner. Don't know many good C coder, but many good C++ coder (and no good PB coder until now, sorry)
PureBasic is written in C. Does this make Fred a veteran, a freak or a bloddy [bloody] beginner?
--Kale

Image
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

It amazes me when people ask for OOP in PureBasic, because it's almost already fully implemented using interfaces and prototypes. Please learn these before asking for OOP or starting arguments about it.
--Kale

Image
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Ok, "I've written a book"-Kale.
I never said C programmers are noobs.
I just said that procedural programing is fewer professionel than OOP.




I've spent a lot of time looking at adding an OO syntax to PB, but the conclusion I have come to is that I don't need it
Ok. Thats your decision.
But we others don't want to join your decision.


Thats my current way to develop OOP.
http://purebasic-lounge.de/viewtopic.php?p=42786#42786

The overhead of it is the time i've to spend for.

Thats what i wish.

Code: Select all

Class CLASSNAME
  Define.l Test
  Define.s AlsoTest
  Declare.l TestMethode (JustaTest.l)
EndClase
..or...

Code: Select all

Class CLASSNAME
  Define.l Test
  Define.s AlsoTest
  Methode TestMethode (JustaTest.l)
     *This\AlsoTest = "Hello World"
  EndMethode
EndClase
It amazes me when people ask for OOP in PureBasic, because it's almost already fully implemented using interfaces and prototypes. Please learn these before asking for OOP or starting arguments about it.
:D
Brice Manuel

Post by Brice Manuel »

Why not make a chapter in the manual about it. Then everybody knows.
A sticky in the feature request forum would suffice.
But, before Brice explodes
Over the past few years, this question has been asked every couple of months. This surpassed annoying a long time ago :roll:

Like I said, I like OOP. But also like I said, it is silly to expect a language to conform to your needs. If PB doesn't meet your needs, find a language that does. That is what I have done and what others have done.
If Fred is forced to get a fulltime job again wouldn't OOP help PB out of the shadows? Just a thought.
I 100% believe that family should always come first and I don't fault Fred for having to get a full-time job. Hell, have you ever seen a picture of the kid? He definitely needs more money so he can eat :lol:

Unfortunately, the financial stuff hit as PB was undergoing a huge overhaul for 4.0, not to mention supporting Linux and Mac, and don't forget to throw in Macs switching to Intel chips. Time seems to be such an issue for Fred that development has crawled to a snail's pace compared to what we are used to out of him.

In spite of everything, PB is in good hands. Fred has made it clear where he stands on the OOP issue, so we should respect his decision. Fred is a smart guy and knows where he wants to go with PB. We should trust him enough to let him do what he thinks is right for PB and the community.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Fred has made it clear where he stands on the OOP issue, so we should respect his decision.
Fred isn't a constant. (#Fred) ^^
I belive, he is a clever man. And when he notes that his community hungers for OOP, he would think about it.

And I don't thing you are mouthpiece of Fred ,Brice ;-)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Hroudtwolf wrote:Ok, "I've written a book"-Kale.
I never said C programmers are noobs.
I just said that procedural programing is fewer professionel than OOP.
No you didn't, you said that it is a fact that only newbies use non-OOP languages. :roll:
Hroudtwolf wrote:Ok, "I've written a book"-Kale.
Yes thats right i have written a book, which is obviously something you should read.

I do like the way you use the phase '"I've written a book"-Kale.' as if it's a derogortory statement. ...lol, It's something that you could never achieve. :lol:
Hroudtwolf wrote:

Code: Select all

Class CLASSNAME
  Define.l Test
  Define.s AlsoTest
  Declare.l TestMethode (JustaTest.l)
EndClase 
This is already possible natively in PB! :roll:
--Kale

Image
Brice Manuel

Post by Brice Manuel »

And I don't thing you are mouthpiece of Fred ,Brice
Don't need to be, Fred has been quite vocal about the OOP issue :wink:
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Yes thats right i have written a book, which is obviously something you should read.
No, thanks. I don't need it :)


Retopic:

Many of the pb programmer wishs OOP in PB.
That's just a wish ;-)

A few of people of the community and myself planed a petitions pro PB-OOP.
We will see, how many other developers thinks the same.
Optional OOP support wouldn't kill anything.
Brice Manuel

Post by Brice Manuel »

29. Will the support of OOP in PureBasic be further extended/improved? Or will PureBasic be orientated rather at the procedural BASIC also in the future?
Fred wrote:No. It will stay a procedural BASIC, I don't plan to add class and such I think it will split the PB world in 2 classes (!): the one which have understood fully how OOP work and other which don't. Which means than you couldn't share source codes easily anymore at one place. Procedural and Object Oriented Programming are two opposite concepts and it's not a good idea to mix them in a BASIC language (which is intended for beginners...)
Fred's official answer from September/October 2005.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Yes, freds press officer.
We know that you know that fred said that ^^
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Hroudtwolf wrote:Yes, freds press officer.
You know, the more you keep trying to insult people the more idiotic you sound.
--Kale

Image
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

I think you and brice idiotic your sounds with your total stupic contra against OOP in PB.
Thats a PRO OOP thread for optional OOP in PB.
Not more.
What is your problem?
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Hroudtwolf wrote:I think you and brice idiotic your sound with your total stupic contra against OOP in PB.
Thats a PRO OOP thread for optional OOP in PB.
Not more.
What is your problem?
ffs, just learn Purebasic as it is first:

http://www.purebasic.fr/english/viewtopic.php?t=19416
--Kale

Image
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

PureBasic is written in C. Does this make Fred a veteran, a freak or a bloddy [bloody] beginner?
I think, he is a beginner. Otherwise he would have taken C++ ^_^.

@Brice: Keep calm, we did get it for the first time, you don't need to repeat it again and again.

Code: Select all

repeat
  if NewPost
    Brice(DropNewPostwithSameInfoAgain)
  endif
forever
This is already possible natively in PB!
Didn't hear the last impact? Got some bad drugs? What are you talking about. My 4.02 doesn't support Class/EndClass.


There is no sense in talking damn crap here. The question is:

@all: Do you want OOP in PB ?
a.Yes.
b.No.
c.I'm too stupid to answer questions.

/edit: @kale: Wolf is in a project that codes OOP in PB and we have got about 15000 lines of code. I think he knows all variants of programming OOP in PB. And none is really good.
Last edited by hellhound66 on Fri Feb 09, 2007 12:56 pm, edited 1 time in total.
Locked