My Generation

Pages: 123456
BHXSpecter, actually, with C11 and C++11, the languages are moving closer to each other.

Lol qu'est-ce que? Is that all he said, because I'm interested in the justification.
No, just left it at that. Which made me laugh because even after everyone pointed out reasons you didn't have to learn C first he didn't change his view. Blind dedication must be nice. Nah!
closed account (N36fSL3A)
[sarcasm] structs are better than classes [/sarcasm] :P
Fredbill30 wrote:
classes are better than classes

Is literally equivalent to what you actually said.
closed account (N36fSL3A)
And by this time you notice the sarcasm tags on my post.

And then you realize that the sarcasm tags imply it was sarcasm.


Seriously you guys tell me to put sarcasm tags or a ':P' on posts that are sarcasm and once I do it you guys react the same.
Well I'm glad you used the tags, but sarcasm is just lost on some people ;).

Though, chrisname, if you want to be anal, you are wrong. As structs are public by default and classes are private by default. So depending on the programmer's preference one is better than the other (per need though).
closed account (N36fSL3A)
I guess no matter how hard I try to please you guys, I never can.
@Fredbill30
I noticed the sarcasm tags and I did realise that sarcasm tags indicate sarcasm (I can read, as you are surely aware given that we are communicating via text). You were still wrong; neither is better than the other because they're exactly the same thing. Just trying to encourage precision. Even in jokes.

BHXSpecter wrote:
sarcasm is just lost on some people

Yeah, I don't understand sarcasm. Good one. We're all laughing over here at your funny joke. Because you're funny. You're a funny guy. A funny guy who understands sarcasm, unlike me.

Though, chrisname, if you want to be anal, you are wrong. As structs are public by default and classes are private by default. So depending on the programmer's preference one is better than the other (per need though).

This is like saying a car with the steering wheel on the left and a car with the steering wheel on the right are not both cars. They're exactly the same thing, they just aren't identical.

Also, it's not like you can't explicitly change the access in either case, so how is one ever better than the other? Because it saves you from typing at most ten extra characters?
Last edited on
I guess no matter how hard I try to please you guys, I never can.

Have you tried going away? [/sarcasm]

Also, it's not like you can't explicitly change the access in either case, so how is one ever better than the other? Because it saves you from typing at most ten extra characters?

Well I guess they can be used to clarify intent, using struct's as POD?
Catfish4 wrote:
Well I guess they can be used to clarify intent, using struct's as POD?

Well, that's what I use them for. I also like to #define interface struct so I can pretend C++ has interfaces. It doesn't make them different to or better than classes.
chrisname wrote:
Yeah, I don't understand sarcasm. Good one. We're all laughing over here at your funny joke. Because you're funny. You're a funny guy. A funny guy who understands sarcasm, unlike me.

Split personalities and word repetition, are you seeing a psychiatrist? With help you can get your life back. Just have to admit you have a problem.
chrisname wrote:
This is like saying a car with the steering wheel on the left and a car with the steering wheel on the right are not both cars. They're exactly the same thing, they just aren't identical.

That has got to be the dumbest comparison I've seen in a long time for equating structs to classes. Yet even your argument still has drivers saying one way is better than the other. Just like some drivers, some programmers will consider one better than the other.

They have even done 'blind taste studies' where they had the exact same thing in both cups, claimed they were different, and people would say one was better than the other. Actually, I remember them doing this for when Starbucks started offering just regular coffee, a study was done where they just used cheap coffee and said one was $x for it while the other was Starbucks for $7 a cup, everyone picked Starbucks thinking it was better.

Point is, tons of things are the exact same with only minor variants, but you will always have people that say one is better than the other.
BHXSpecter wrote:
Split personalities and word repetition, are you seeing a psychiatrist? With help you can get your life back. Just have to admit you have a problem.

I really hope you were trying to be funny with this, and you aren't as stupid as someone would have to be to miss the sarcasm in my last post. I didn't think I would have to be explicit about it, seeing as sarcasm was the topic of discussion.

That has got to be the dumbest comparison I've seen in a long time for equating structs to classes.

I see you completely missed my point. A class and a struct are the exact same thing as each other with one minor, very superficial difference. A car with the steering wheel on the left and one with the steering wheel on the right are also the exact same thing as each other with one minor, very superficial difference. So the analogy is valid. What makes it "dumb"? That you don't understand it? That some people prefer one over the other for absolutely no reason whatsoever, except that it's their "personal preference"? That people are stupid and settle on preferences without doing any reasoning first? I know all these things, I don't need to be told them.

Point is, tons of things are the exact same with only minor variants, but you will always have people that say one is better than the other.

And if it really is a minor variation, they will always be wrong. So what exactly is your point?
closed account (N36fSL3A)
Well, technically if we're speaking C v C++ then C structs wouldn't be exactly the same to C++ classes/structs.

(I don't even know why people still use C, except for systems without C++ compilers.)
Last edited on by Fredbill30
I don't even know why people still use C, except for systems without C++ compilers.

For the same reason people still ride bicycles today so many years after motorbikes were invented. There are health benefits. ;)
closed account (N36fSL3A)
Oh. Thanks for clarification.
I really hope you were trying to be funny with this

Yes. I was poking fun at the 'we' part of your comment.
I see you completely missed my point.

No I got your point, and people can have valid analogies, but they can still be dumb. The public/private by default and changing them is superficial, a car with steering wheel on one side or the other and changing them is not (which is where I said the analogy was dumb due to the drastic levels of change compared to changing public/private and changing left/right steering column).
And if it really is a minor variation, they will always be wrong. So what exactly is your point?

You missed my point though. Let me rephrase it. Anyone that has learned classes from a C++ tutorial or book knows that classes and structs are the same thing. If a person says one is better, it is their personal opinion and they won't change no matter how many times you point out the fact. :P

I want to make one thing clear, I was saying the complexity of the car analogy I thought was dumb. I was not and do not think you are dumb.
closed account (N36fSL3A)
I think this is stupid that this problem arose from obvious sarcasm.
Fredbill30 wrote:
Well, technically if we're speaking C v C++ then C structs wouldn't be exactly the same to C++ classes/structs.

That's very true, C++ structs are totally different to C structs.

(I don't even know why people still use C, except for systems without C++ compilers.)

C++ has namespace, classes and overloading, which means that multiple symbols can have the exact same name provided (1) they aren't in the same namespace or (2) they don't have the same number and types of parameters. To achieve that, C++ does something called "name mangling", which means that a function called foo won't necessarily be referred to by a symbol named foo: if it's in namespace std and takes two int parameters then it might be called std_foo2int. The problem with name mangling is that there's no standardised way to do it, so two different compilers, or even different versions of the same compiler (maybe even the same version of the same compiler with different settings) won't produce the same symbol names, which means that you may not be able to use symbols in a file compiled by different C++ compiler or compiler version. You can use external linkage (extern "C") but you have to wrap everything.
closed account (N36fSL3A)
That's very true, C++ structs are totally different to C structs.


Not totally different. Just C++ structs have... well more.
FredBill wrote:
Not totally different. Just C++ structs have... well more.


Well, so much more that they are totally different. Write a C program using a struct and you will see.

Just going back to Starbucks coffee mentioned by BHX, I refer to it as Tarbucks because they just don't seem to know how to do it - IMO compared to other coffee makers anyway ..... :-)

Edit:

I wonder how many people were aware the C++ unions are also similar to C++ classes, they can have ctor, dtor, functions & access specifiers, but there are a list of restrictions.
Last edited on
Pages: 123456