The-Eternal-Quest
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Friend classes

4 posters

Go down

Friend classes Empty Friend classes

Post  Admin Tue Dec 07, 2010 5:53 am

Out of complete curiosity. Who here uses friend classes? I use them a fair bit I know they erase the purpose of OOP but say you have a singelton class with manages a items wouldn't it be easier for it to just access the item components data directly rather than calling set/get shit for example

Code:

// Loading data for items the OOP way
std::ifstream file("Datafile")
std::string name;
file >> name;
Items.SetName(name);
int width = 0;
file >> width;
Items.SetWidth(width);
int height = 0;
file >> height;
Items.SetHeight(height);
std::string triggerscript;
file >> triggerscript;
Items.SetName(triggerscript);

Code:

// The pretty C way!
std::ifstream file("Datafile")
file >> Items.name;
file >> Items.width;
file >> Items.height;
file >> Items.triggerscript;

Am I just lazy?

EDIT: Also whilst introducing the overhead allocating data AND copying it and THEN copying it again is bound to be slower? Suspect
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Thu Dec 09, 2010 1:19 pm

ROFL, I guess every is just disgusted at me even making this topic lol!
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  eatcomics Thu Dec 09, 2010 2:38 pm

I am extremely disgusted. OOP was invented to save your sanity, it is a Jesus of programming, how could you go against OOP like that... WE SHOULD BURN YOU AT THE STAKE FOR GOING AGAINST OOP

in all seriousness, fuck OOP, code how you want, this isn't professional grade software xD
eatcomics
eatcomics
God

Posts : 153
Join date : 2010-10-21

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Fri Dec 10, 2010 8:56 am

eatcomics wrote:I am extremely disgusted. OOP was invented to save your sanity, it is a Jesus of programming, how could you go against OOP like that... WE SHOULD BURN YOU AT THE STAKE FOR GOING AGAINST OOP

in all seriousness, fuck OOP, code how you want, this isn't professional grade software xD
Lol

To be honest who actully gives a fuck? As long as the software does "what it should" then its a success right?

Not many people realize how slow OOP can get.
I only dare say this because its in a private forum Wink
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Fri Dec 10, 2010 9:28 am

Admin wrote:
eatcomics wrote:I am extremely disgusted. OOP was invented to save your sanity, it is a Jesus of programming, how could you go against OOP like that... WE SHOULD BURN YOU AT THE STAKE FOR GOING AGAINST OOP

in all seriousness, fuck OOP, code how you want, this isn't professional grade software xD
Lol

To be honest who actully gives a fuck? As long as the software does "what it should" then its a success right?

Not many people realize how slow OOP can get.
I only dare say this because its in a private forum Wink

i agree, i dont think any of our followers would care ( yet ) but ya lol
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Fri Dec 10, 2010 12:26 pm

WSPSNIPER wrote:
Admin wrote:
eatcomics wrote:I am extremely disgusted. OOP was invented to save your sanity, it is a Jesus of programming, how could you go against OOP like that... WE SHOULD BURN YOU AT THE STAKE FOR GOING AGAINST OOP

in all seriousness, fuck OOP, code how you want, this isn't professional grade software xD
Lol

To be honest who actully gives a fuck? As long as the software does "what it should" then its a success right?

Not many people realize how slow OOP can get.
I only dare say this because its in a private forum Wink

i agree, i dont think any of our followers would care ( yet ) but ya lol
Lol, "yet"

I admit I approach things with a C-style manor too much but when somthing will

1- Take less time
2- Do the job just the same
3- EVEN run better

Why fuck should this be a issue?
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  dandymcgee Fri Dec 10, 2010 1:31 pm

Admin wrote:
To be honest who actully gives a fuck? As long as the software does "what it should" then its a success right?

Not many people realize how slow OOP can get.
I only dare say this because its in a private forum Wink
What!?!??! Did you seriously just say that? Shocked

Lol.

dandymcgee
New comer

Posts : 5
Join date : 2010-10-19

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Fri Dec 10, 2010 3:07 pm

dandymcgee wrote:
Admin wrote:
To be honest who actully gives a fuck? As long as the software does "what it should" then its a success right?

Not many people realize how slow OOP can get.
I only dare say this because its in a private forum Wink
What!?!??! Did you seriously just say that? Shocked

Lol.

i agree, sometimes having an oop approach will be better even if your points may be correct because of organization and being able to see it in a real life situation + the ability to change it fairly quickly with out much hassle on changing code all over the place. but i do agree that some people do put too much emphasis on oop... whatev as long as it gets the job done right Very Happy
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  eatcomics Fri Dec 10, 2010 6:18 pm

I'm thinking component based for my next one, some OOP but not a whole lot Very Happy
eatcomics
eatcomics
God

Posts : 153
Join date : 2010-10-21

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Fri Dec 10, 2010 7:14 pm

eatcomics wrote:I'm thinking component based for my next one, some OOP but not a whole lot Very Happy

i did a componet based sys and loved it!
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Sat Dec 11, 2010 11:40 am

Component systems are awesome just because of their flexability Smile
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Sat Dec 11, 2010 3:46 pm

im going to make another component system but im going to do some research on different implementations of it first so i can make a super nice one
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  eatcomics Sat Dec 11, 2010 9:55 pm

Can you link me to anything good ya find?
eatcomics
eatcomics
God

Posts : 153
Join date : 2010-10-21

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Mon Dec 13, 2010 9:57 am

dandymcgee wrote:
Admin wrote:
To be honest who actully gives a fuck? As long as the software does "what it should" then its a success right?

Not many people realize how slow OOP can get.
I only dare say this because its in a private forum Wink
What!?!??! Did you seriously just say that? Shocked

Lol.

HOLY FUCK THIS ISN'T THE PRIVATE FORUMS!!?!?!?!

Er.... What I meant to say was, I love OOP damn those C-styled hardcodes don't know what they're missing Wink
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  eatcomics Mon Dec 13, 2010 1:48 pm

HAHAHAHAHA admin fail Razz
eatcomics
eatcomics
God

Posts : 153
Join date : 2010-10-21

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Tue Dec 14, 2010 3:44 am

eatcomics wrote:HAHAHAHAHA admin fail Razz
Yip, I fucked up there.
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Tue Dec 14, 2010 9:39 am

eatcomics wrote:HAHAHAHAHA admin fail Razz

LMAO
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Admin Sun Dec 19, 2010 10:56 am

The forum was dead before, now even team members are using it rarely. Hmm......
Admin
Admin
Admin

Posts : 279
Join date : 2010-10-19

https://eternalquest.forumotion.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Mon Dec 20, 2010 8:00 am

Admin wrote:The forum was dead before, now even team members are using it rarely. Hmm......

i think over winter break we will be able to get more done but school and work are taking all of my time right now Razz
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  eatcomics Mon Dec 20, 2010 5:20 pm

WSPSNIPER wrote:
Admin wrote:The forum was dead before, now even team members are using it rarely. Hmm......

i think over winter break we will be able to get more done but school and work are taking all of my time right now Razz
seconded
eatcomics
eatcomics
God

Posts : 153
Join date : 2010-10-21

Back to top Go down

Friend classes Empty Re: Friend classes

Post  WSPSNIPER Tue Dec 21, 2010 7:29 am

eatcomics wrote:
WSPSNIPER wrote:
Admin wrote:The forum was dead before, now even team members are using it rarely. Hmm......

i think over winter break we will be able to get more done but school and work are taking all of my time right now Razz
seconded

actually i have the most free time when im at school lol xD
WSPSNIPER
WSPSNIPER
Admin

Posts : 149
Join date : 2010-10-19
Age : 30
Location : MN

http://www.theeternalquest.comze.com

Back to top Go down

Friend classes Empty Re: Friend classes

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum