OO Programming in PureBASIC ????

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
horia
User
User
Posts: 11
Joined: Fri Apr 25, 2003 6:54 pm

Post by horia »

You're right , Ricardo !
Horia
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Kale:
Oh sod it im fed up with this, I'll not post anymore. cya later...
I thought you liked to debate :? Sincerely, I hope you do not leave the forum.
lanael
New User
New User
Posts: 5
Joined: Wed May 14, 2003 8:31 am

Post by lanael »


From the link above :
"OOP is more of a program organizational philosophy rather than a set of new external solutions or operations. "

I agree with that but why does he continue to criticize OOP after thinking that ?
It's a tool like other tools...

Nobody's forced to use it !?


And that's the point here ...

Every anti-oop guy are afraid that PureBasic goes to OO.

Do you know you can make pure C programs with a C++ compiler ?

About the example I show, it was just two stuff *added* to the language. It was not about *transforming* PureBasic in a OO language ( if even such a language exists... hum.. ; )


@Magi : hey another Marc here !! :)

@"young fighters" : ...

So... waiting for the main coder's feeling...
TronDoc
Enthusiast
Enthusiast
Posts: 310
Joined: Wed Apr 30, 2003 3:50 am
Location: 3DoorsDown

Post by TronDoc »

ricardo wrote:that some of us LOVES the PB way to manage the GUI.
:D Joe
peace
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

lanael wrote: @"young fighters" : ...

So... waiting for the main coder's feeling...
Hum, you guys don't listen, eh :?:

Here you go...
fred wrote:For all: no. It's a BASIC dialect. But I will do an 'Interface' like structure to access easily the COM/DX components from PureBasic.
For me, this says everything :D

Timo
quidquid Latine dictum sit altum videtur
lanael
New User
New User
Posts: 5
Joined: Wed May 14, 2003 8:31 am

Post by lanael »

Ok, ok, I give up ! :)

I've just need to find a good C++ game library...
Wish me good luck !!
User avatar
geoff
Enthusiast
Enthusiast
Posts: 128
Joined: Sun Apr 27, 2003 12:01 am
Location: Cornwall UK
Contact:

Post by geoff »

Ricardo, I agree with you 100%

I'd hate to see free and easy PB descend into a morass
of OOP rules and complexity.
CoderLaureate
User
User
Posts: 50
Joined: Fri Apr 25, 2003 7:21 pm
Location: The World is my country, all mankind are my brethren, and to do good is my religion.
Contact:

I don't think we should bash OOP so quickly.

Post by CoderLaureate »

I agree with Fred.

PB is Pure Basic. Never has Basic ever been intended to be an OOP language. VB comes close. VB.Net comes closer, but they're both notoriously expensive.

I love Pure Basic, and I love OOP.

If you want to program in OOP try Java, or C++, or SmallTalk. I'm a Java developer by profession, and I love the OOP methodology. I truly believe that OOP will be a major part of all programming in the future.

But let's keep the OOP out of Pure Basic. We have Structures, that's close enough.


-Jim
CoderLaureate
User
User
Posts: 50
Joined: Fri Apr 25, 2003 7:21 pm
Location: The World is my country, all mankind are my brethren, and to do good is my religion.
Contact:

Post by CoderLaureate »

lanael wrote:Ok, ok, I give up ! :)

I've just need to find a good C++ game library...
Wish me good luck !!
Try Crystal Space:
http://crystal.sourceforge.net/drupal/
It's cross platform and it's free.

We might even be able to use the API in Pure Basic.


-Jim
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

The fact is a bit different. All the nextgen API from microsoft (and other system too) seems to be OO has it provides number of advantage over other methods. So PB will have an easy way to use such libraries (COM & DX), I just need to clear my mind and thing to an elegant way to implement it without broke all the syntax. But it will be only an OO access and never an OO langage, with class, methods, attributes, inheritance, polymorphisme etc... That's what I mean. Is it this time clear enough ?
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

I don't know if this is off-track so feel free to flame me if so :wink: but wouldn't a useful all-round syntax be...

MyStruct\MyFunction()

Edit: And of course...

*MyStruct\MyFunction()

Fire away!
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

That's exactly how I would like to do it.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

If somebody needs OOP in Basic:

Phoenix Object Basic
http://www.janus-software.com/

HBasic
http://hbasic.sourceforge.net/

both are free, but interpreted languages...

I can live without OOP.
I like to work with a rock solid core language - let's concentrate on that.
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

lanael wrote:
It's a tool like other tools...

Nobody's forced to use it !?


And that's the point here ...
I've only just discovered Pure Basic, and I think its great.

I just hope the language doesn't get polluted with this type of thinking.

As far as I can see PB is so amazing because it complies to a very personal vision. I hope it stays amazing by keeping that vision, rather than falling into the kitchen sink mentality of VB and Delphi.
mp303

Post by mp303 »

I don't understand why you people argue against OOP? as was said, you wouldn't have to use it ... in my opinion, OOP works as well in BASIC dialects as it does in any other language - neither C or Pascal (which later became Delphi) were OOP languages originally, but it sure hasn't done any harm to the languages, or made things anymore difficult for the programmers, to have the OOP features added; you can still compile your monolithic disorganized oldskool C or Pascal code in these compilers ;) ... wether you want to enjoy the benefits of object-oriented development is entirely up to yourselves.

I agree though, a full OOP solution would be overkill - just a few of the most essential OOP features would suffice ... it's mainly just a tool that helps you maintain overview of very large projects with many entities, makes it easy for you to reuse your code, and makes it possible for others to utilize your code without needing to know much about how it works - all of these effects are valuable additions to any language, and you can still write "pure" basic if that's all you need...
Locked