OOP in PB?

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

r_hyde wrote: I think this discussion on OOP should remain open and active, and anyone who has only "Fred said no" to say about it should maybe refrain from hitting the submit button.
So you want it 'open and active' but you don't want to hear the views of the people who disagree with you (and post the truth!)? :shock:
r_hyde wrote: I suspect that certain OOP-like features (if not full-blown OOP), if implemented well and made easy to use, would probably increase my productivity and enjoyment while working in PB. I'm sure Hroudtwolf and others feel much the same way. That is all.
OOP-like features are already implemented.
--Kale

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

Post by Hroudtwolf »

OOP-like features are already implemented.
That are crutches and not OOP-like features.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Hroudtwolf wrote:
OOP-like features are already implemented.
That are crutches and not OOP-like features.
If you are restricted theres nothing stopping you using C++ or C#.
--Kale

Image
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Post by r_hyde »

So you want it 'open and active' but you don't want to hear the views of the people who disagree with you?
That's a disingenuous response. Of course I don't mind reading the opinions of those who disagree! I suggested, though, that if all you have to say is "it won't happen because Fred said it won't happen" then you are not engaging in the discussion, you're only trying to end it. I'd like a discussion on the merits and substance, and "Fred says no" over and over again offers no substance.
OOP-like features are already implemented.
This is true, but I think they could be made simpler to use via, for instance, a Class keyword. There was a good example of this earlier in the thread. I've used a couple of the OOP-like implementations in current PB, and while interesting, they are not simple to code, update, grow, or maintain. I know you're a talented programmer, but I hope even you would admit that the hoops you have to go through to implement OOP-like features in PB are nowhere near as clean and simple as Class...EndClass with all the members and methods defined inbetween.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> No OOP -> No professional usefulness

That is the ultimate insult to everyone here who has written and sold commercial
products in PureBasic. You're labelling them all as unprofessional coders. Nice one!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

If you are restricted theres nothing stopping you using C++ or C#.
Thats totally right.
And when I believe there is every hope senseless, I will develop more and more in cpp.

Hey, thats wonderfull you have a opinion for it. ;-)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Hroudtwolf wrote:
If you are restricted theres nothing stopping you using C++ or C#.
Hey, thats wonderfull you have a opinion for it. ;-)
I know, it's exactly what i do! :roll:

I just can't believe people spent time wanting a BASIC to become OOP compatible when there are 1000's of free OOP languages out there to use. :roll:
--Kale

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

Post by Hroudtwolf »

It's totally equal which opinion you do have to this theme.
Our wish goes to Fred and not to you or Brice.
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Post by r_hyde »

For the record, I do not align myself with the opinion that OOP is a must-have feature of PureBasic. I only think it's an interesting idea that might make some aspects of programming PB more straightforward and enjoyable.
Character
Enthusiast
Enthusiast
Posts: 337
Joined: Mon Aug 07, 2006 3:51 pm
Location: Netherlands

Post by Character »

I wish there were 2 Freds:
1 OOP & 1 non-OOP :D
Cessante causa cessat effectus
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Post by r_hyde »

I just can't believe people spent time wanting a BASIC to become OOP compatible when there are 1000's of free OOP languages out there to use.
I see your point, actually. Yet, I have a sort of counterpoint that's flawed only in that it is incredibly subjective.

I have spent a lot of time programming OOP in C++, and I simply don't like it - it's not much fun. I have done a great deal of Python development, and while that's a good, fun (free & cross-platform!) OOP language it suffers from being interpreted rather than compiled. So here's the thing: what language is as easy to use as Python, and compiles into compact, fast executables like C++, that's also object-oriented (or at least object-based)? I haven't personally managed to find one, especially not a free one. But I think PB, with the addition of some simple-to-use OOP-like features built in, would fit that description rather nicely. Is it wrong to want that, or to suggest that it's an interesting idea?
AndyX
User
User
Posts: 12
Joined: Wed May 04, 2005 6:40 pm
Location: Austria

Post by AndyX »

I totally agree with Hroudtwolf. I think it would be really really really nice to have OOP in PureBasic :D
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

I think we need to lighten the mood a bit here:

Image

:lol:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Don't misuses our mascot for a diversion :lol:
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Let me get some stuff straight...

1) Freds primary motivation for taking another job was not the money alone.
He was bored from working at home and needed to get back into a larger team (company)
to work together with other people.

2) PB will never be one of the top programming languages, but the reason for this is far from this OOP discussion.
I have heard this argument a lot over the years: "PB is great, but if freature X were implemented, it would be number one in the world"
Feature X would be whatever that person wanted at the moment, so for you it is OOP.

What you guys need to accept is that this is not true. It is not about features.
To get to the top, you need a big company, which can pay a ton of people
for the single task of writing the documentation, let alone for the coding,
and most importantly which will invest a huge amount of money for marketing and such.
Well, buying out the competition helps that process as well... ;)

Either that, or you manage to create an industrial standard (like c++), for which
multiple companies write compilers, but the chances for that happening with PB are even lower.

We are a small team, who work on PB in their spare time. We are doing this for fun,
not to conquer the world. I think you have to understand that.

3) The decision agains OOP in PB is not based on ignorance.
We know the concept of OOP very well. Both Fred and I have a lot of experience
with OO based languages, and are using them very often.

So the decision against OOP in PB is not based on our hate for the concept,
or because we think procedural programming is in some way superior,
but simply because we think it would not be good for the community.
Fred has explained this before: We do not want to split the community
into an OOP and a non-OOP camp.
There are many OO based languages out there, even among the basic languages.
Nobody forces you to stick with PB forever. If you don't like it, you move one.
That is what programmers do. Choose the right tool for your task.
Don't choose your tool and then wait for it to adapt to your task. Makes sense, doesn't it ?

I do not see why we should reinvent the wheel here. There are many great OOP languages
out there. PB does not need to try to be one of them.
We try to create a good procedural language here, because those have their purpose as well.


On a sidenote, about the "Beginners vs Professionals" argument:

In my opinion it is a common mistake among programmers to try to define
themselves as "professional" based on what tools/languages they use:

- The C guys think they are superior because everybody who does not understand pointers is a wimp.
- The Java guys think they are superior because pointers are just evil.
- ...

What you have to realize is that the end user does not make this distinction.
He does not judje your work based on the language it is written in (he does not care),
but simply on how well your product works.

So, if you think you need to have OOP features, just because that makes you look more professional,
well... maybe it is time to grow up.

To sum it up:
Real OOP in PB is not going to happen any time soon.
That does not mean you are not entitled to your opinion that it would be good in PB, or that you cannot keep requesting it, but maybe you should consider
that it will not happen anytime soon, and consider some alternatives if you really need it.

Moving on to new programming languages is not a big deal... its what programmers do... ;)
quidquid Latine dictum sit altum videtur
Locked