Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Light-Weight Object Oriented Programming.

Author
Message
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 12th Oct 2005 18:39
Last time I asked this, it became a procedural vs. oo debate. This time- pleeaasee- don't do that.

So the question is, in a light-weight oop language (like JavaScript, for example), what are the most essential oop elements you wouldn't want to miss?


Play Nice! Play Basic! Version 1.088
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 12th Oct 2005 18:45
No one can answer the question.
You need to more work through it and add as you feel things are needed.

Start with the Basic structure design, then work upward from that.
So many people will have conflicting views, and thoughts. Things used more commonly are often entirely missed out and not noticed until too late.

Only way you can really put something together is determining what use you can personally make of it and add from there.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 12th Oct 2005 18:55 Edited at: 12th Oct 2005 18:56
Erm... it's about "views and thoughts", that's why I posted this question here.


Play Nice! Play Basic! Version 1.088
tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 12th Oct 2005 18:58
i think he means " genericly"
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 12th Oct 2005 19:03 Edited at: 12th Oct 2005 19:04
The question is simple, what do you personally think are the most important elements of object oriented programming. What part of the OOP philosophy do you use most. That's all I want to know.


Play Nice! Play Basic! Version 1.088
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 12th Oct 2005 20:58
doesn't it also depend on the language though.
although I can't name what the hell I do, the way I program in C# and C++ is quite different because they have different styles of OO implimentation.

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 12th Oct 2005 22:48
One, I would need for my objects to be able to have their own functions (ala C++/Java classes). I love that PlayBasic has Types, like structs, but for OO there would need to be a higher level than that.

Also the way to make functions and member variables private, public, protected, and/or static.

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 13th Oct 2005 00:22
sort of what jeku said..

i just need the variables and the functions (and the private-public-protected-static stuff too i suppose...)



"We make the worst games in the universe."

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 13th Oct 2005 00:35
ive been wondering this for ages.. but what is OOP?


Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 13th Oct 2005 01:41 Edited at: 13th Oct 2005 01:41
Object Oriented Programming

"We make the worst games in the universe."

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 13th Oct 2005 02:09
Empty, A simple concept of Class would be a good basis. The ability to have not only simple property fields similar to a UDT, but functions/subs contained in the object would be very good. I wont even ask about Events, but if you managed that that would be golden. Lets leave Inheritance for another day

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 13th Oct 2005 20:05
Thanks for the input.


Play Nice! Play Basic! Version 1.088
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 13th Oct 2005 20:30
Jeku,

Quote: " One, I would need for my objects to be able to have their own functions (ala C++/Java classes). I love that PlayBasic has Types, like structs, but for OO there would need to be a higher level than that.
"


In terms of types, we're not even close to finished with those (the current implementation is prehistoric). V1.09 will implement static Arrays into types at least. We have a cross section of ideas on the table already from Dynamic arrays in types, to typed type pointers. Prolly some accessibility controls also, but those will mostly only needed through future modularity in the command sets (and if exposing typed arrays/variables in objects) .

Kevin Picone
[url]www.underwaredesign.com[/url]
Play Nice!Play Basic (Release V1.088 Out Now)- Play Extreme with Play Basic FX {TBA}
DSG
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Hampshire, England
Posted: 14th Oct 2005 00:36
Methods, attributes, both with access modifiers. Inheritance... the whole shebang really. Polymorphism is a feature that I use less often than the others but I still wouldn't use an OO language without it!

One thing I would push for though is static attributes in classes. These are essential for many common class designs such as the singleton and the factory design pattern.
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 14th Oct 2005 01:56
@uwdesign - Sweeet!

MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 14th Oct 2005 10:08
I can't imagine what I'd do without classes these days. Types and structures are well and good, but with classes come control. Implementation of classes are important too. I want things compact and easy for overview.

I don't like for instance c++ way of doing things where you declare classes in one file (.h) and then implement classes in another (.cpp). I also don't like visual basic's way of doing things because even simpler code so easily grows so... extended. But that's just what I'm used to, I suppose.

But classes is what I'd miss most if I had to revert from OOP. Even if they had no inheritance or polymorphism to speak of. But as CattleRustler said, let's leave that to another day.

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Oct 2005 00:05
you know you can just declare your classes in the .cpp file...

unless i missed something

"We make the worst games in the universe."

MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 15th Oct 2005 00:34
@Peter_

That's allright. I don't use c++ anyway.

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----

Login to post a reply

Server time is: 2024-11-15 22:29:02
Your offset time is: 2024-11-15 22:29:02