It is currently Tue May 21, 2013 2:37 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Object Orientation Programming
PostPosted: Thu May 21, 2009 6:58 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 249
Hi

Is there any plans to include Object Oriented Programming in PureBasic if not I would like to suggest it.

Thanks,
Simon


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 21, 2009 7:07 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
I think you should do a search of these forums! :)

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 21, 2009 8:00 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
Image

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: Object Orientation Programming
PostPosted: Thu May 21, 2009 8:29 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Jul 21, 2006 4:41 am
Posts: 2300
Location: Berlin, Germany
swhite wrote:
Is there any plans to include Object Oriented Programming in PureBasic

No.

swhite wrote:
... if not I would like to suggest it.

Don't waste your time. It won't happen.

_________________
Image
Windows 7, 64-Bit, PB v4.51 / Whose Hoff is it anyway?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 21, 2009 10:39 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 6:03 pm
Posts: 3002
Location: Lincoln, UK
Just to add flames to the fire, i've been an advocate of PB including a way of natively programming in an OOP way. I don't think it will happen because i think Fred once said it would require a complete redesign of the compiler and he wasn't that 'au fait' with OOP.

I still would like to see it in the future. :)

For nostalgia, here's an old thread discussing way of achieving as near as damn it OOP techniques:
http://www.purebasic.fr/english/viewtopic.php?t=19416

_________________
--Kale

Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 22, 2009 6:26 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Feb 12, 2005 3:35 am
Posts: 787
Location: Germany(Hessen)
Maybe PB never goes OOP.
But there are multiple ways to still develop OOP like with PB.

Here are just a few examples:

Preprocessor by Sirhc
http://purebasic-lounge.com/viewtopic.p ... 15&start=0

Preprocessor by INC
http://www.purebasic.fr/english/viewtop ... 36&start=0
http://www.purebasic-lounge.com/viewtop ... 69&start=0

Preprocessor by MK-Soft
http://www.purebasic.fr/english/viewtop ... 74&start=0

Preprocessor by FSW
http://www.purebasic.fr/english/viewtop ... 16&start=0

A lot of user class examples
http://www.purebasic-lounge.com/viewforum.php?f=95

Best regards

Wolf

_________________
German blog about IT and programming
German PB forums


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 22, 2009 8:48 am 
Offline
Addict
Addict
User avatar

Joined: Tue May 08, 2007 1:27 pm
Posts: 2715
Location: Chiba, Japan
Powerbasic added it. you could try their compiler. not a bad compiler but different mind set behind it.

separate from the home rolled stuff there there are also COM interface includes too like COMmate

_________________
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 2:56 am 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 249
I know PowerBasic has this functionality but I am very much interested in a cross platform solution. I very much like the speed of Purebasic and small exe size. I realize that you lose some of this with OOP but I program using OOP all the time now and the one big advantage I see is that I can inherit from my base classes in any of my projects. When I improve my base classes all the projects automatically inherit the improvements. In my case I do not even have to recompile my projects. I just drop my improved base classes into the appropriate folder and applications gets all the improvements automatically.

Simon


Kale wrote:
Just to add flames to the fire, i've been an advocate of PB including a way of natively programming in an OOP way. I don't think it will happen because i think Fred once said it would require a complete redesign of the compiler and he wasn't that 'au fait' with OOP.

I still would like to see it in the future. :)

For nostalgia, here's an old thread discussing way of achieving as near as damn it OOP techniques:
http://www.purebasic.fr/english/viewtopic.php?t=19416


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 11:17 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 6:03 pm
Posts: 3002
Location: Lincoln, UK
swhite wrote:
I very much like the speed of Purebasic and small exe size. I realize that you lose some of this with OOP

That's not really true. If you organise your program correctly there's no reason why programming using an OOP method won't give you the same size exe and speed.

_________________
--Kale

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 11:46 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1334
Location: Pas-de-Calais, France
Kind of "off-topic" between nature and computer : I was thinking the other day about worms, seeing them just as living intestines. Following this idea, I realised that nature don't fully "inherit" things. Each living organism has characteristics of his ancestors, sometimes not used, but after some time it's cleaned, and unused functions are thrown away. It's giving maximum efficiency.
Just a thought, sorry! :wink:

_________________
The Shooting Crew ~> http://www.shootingcrew.com/
Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 2:42 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 5808
To be honest, that's a process I go through a few times a day, it often involves soft paper and flushing...

:wink:

_________________
( PB5.11 Win7 x64 Dell XPS710 Raid 0 VelociRaptor Intel Q6600 nForce 5 NVidia GTS450 )
( You have two options: psychotherapy, or the PureBasic Survival Guide... )


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 3:54 pm 
Offline
Addict
Addict

Joined: Fri Apr 25, 2003 11:13 pm
Posts: 1073
Location: Netherlands
Kale wrote:
swhite wrote:
I very much like the speed of Purebasic and small exe size. I realize that you lose some of this with OOP

That's not really true. If you organise your program correctly there's no reason why programming using an OOP method won't give you the same size exe and speed.


A misconception.
first.. i like oop 2nd, with oop all functions need to be present due the way the class needs to be exposed.
By using ordinary functions, they may not all been called, a good compiler only includes what get's called.
I am not sure about purebasic but for example the static libs icw the lcc compiler does this.

I assume in most languages using classes your are stuck with the full size of the compiled class.

_________________
Hellobasic website


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 10:41 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 6:03 pm
Posts: 3002
Location: Lincoln, UK
Edwin Knoppert wrote:
Kale wrote:
swhite wrote:
I very much like the speed of Purebasic and small exe size. I realize that you lose some of this with OOP

That's not really true. If you organise your program correctly there's no reason why programming using an OOP method won't give you the same size exe and speed.


A misconception.
first.. i like oop 2nd, with oop all functions need to be present due the way the class needs to be exposed.
By using ordinary functions, they may not all been called, a good compiler only includes what get's called.
I am not sure about purebasic but for example the static libs icw the lcc compiler does this.

I assume in most languages using classes your are stuck with the full size of the compiled class.

Yes, it depends on the compiler. But OOP does not necessarily equal bloat and slow code. Also, even if a compiler did add a few kb to an exe due to some overhead while compiling using an OOP style, this is nothing compared to the time saving and better organisation of the program.

It's a misconception to think that using OOP in your programs has any bad side effects. It is only a different way of thinking and working. period!

_________________
--Kale

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye