[Fixed] Another Hexen ACS Bug

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Postby Graf Zahl » Fri Nov 14, 2003 3:04 am

C++ is C++, no matter how much C-compatible code is in there. As C++ is mostly a superset of C I really don't see the point of your extremely pedantic differentiation. As it is the code no longer compiles as C therefore it is no longer C. Period. It doesn't matter that large parts of it are converted C code. It's still C++.

(When people say C++, they typically imply classes, etc, even though you don't have to use them -that's all).


You know, I had endless discussions with other programmers about this issue. Unfortunately there are far too many of those who think that developing in C++ means that they have to implement everything as classes which of course is utter nonsense and more often than not creates really bad and inefficient code. I rarely write programs which have more than 50% of their code in classes. For too much stuff it's just not worth it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Fri Nov 14, 2003 4:58 am

Let's not get into yet another pointless debate about semantics.

AFAIK, Doom was written entirely in C. If I'm wrong, I'm certain someone here will correct me, most likely in a rude manner. But I'm pretty sure I'm right on that point.

It would logically follow that the released source code was C. However, as Graf points out, enough C++ code has been added to it that trying to remove that code and get the code to compile as purely C code would be a pain, and probably just wasted effort. C++ is an upgrade to C and supports ~90% of its features, and then adds stuff that is either really useful or a waste of time depending on who you talk to.

But the short answer IS that ZDoom is written in C++.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Hirogen2 » Fri Nov 14, 2003 6:47 am

Heh just put a pure C-function(s) in a single file and compile that one with "C" flags... linking g++ and gcc mixed files works fine, and it should do so in MSVC too.
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Graf Zahl » Fri Nov 14, 2003 9:32 am

Of course it does. zlib which is linked into ZDoom statically is pure C and neither linker nor compiler ever complain.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Graf Zahl » Fri Nov 14, 2003 9:33 am

HotWax wrote:Let's not get into yet another pointless debate about semantics.

AFAIK, Doom was written entirely in C. If I'm wrong, I'm certain someone here will correct me, most likely in a rude manner. But I'm pretty sure I'm right on that point.

It would logically follow that the released source code was C. However, as Graf points out, enough C++ code has been added to it that trying to remove that code and get the code to compile as purely C code would be a pain, and probably just wasted effort. C++ is an upgrade to C and supports ~90% of its features, and then adds stuff that is either really useful or a waste of time depending on who you talk to.

But the short answer IS that ZDoom is written in C++.


I have nothing further to say about that. That's 100% the way it is.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randomlag » Fri Nov 14, 2003 10:44 am

Nope. You again are not attempting to understand what I wrote (just like the PWAD thing). Try reading the post and not have your mind made up what I'm saying.

At not time did I say ALL of it was C, just that some of it technically is C. Let's say I take a foo.C program, now I make it foo.CPP. Is it now C++? Of course not. It's that simple Graf. Edit: Nor does combining it with "real" C++ code make it C++, no more so than the ZLIB linking example that you acknowledge does. Think outside of the box.

The distinction is important to make to anyone not familiar with this topic, otherwise they might be led to the invalid conclusion later on. That you avoid the distinction is more a matter of stubborness vs a simple fact as clearly illustrated by my example. And yes some of the code in ZDOOM essentially underwent just that transformation. And NO, you can't compile ZDOOM as C - never ever said that anywhere at any time.

Just think about it. That's 100% the way it is.

Btw, your are the one being pedantic with your repeated "superset", etc (something that was clearly obvious in the context of my post need not be repeated over and over and over). I was merely pointing out that the code is technically C and renaming it to CPP does not make it C++ (edit left out the ++ :oops: ). Period. Now matter how stubborn you want to be.

And C++ support 99+% (maybe 100%) of the features of C AFAIK (assuming you fix type errors). Anyway, never had a problem changing from C to CPP (which is a lot of code).

I have written approximately 1 million lines of code none of which use "classes" yet all are CPP :) I could switch them to C with very little effort. In fact, I switched about 300,000 lines from C to C++ also with very little effort since they were devoid of "C++" specific features.
Last edited by randomlag on Fri Nov 14, 2003 11:28 am, edited 3 times in total.
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby Graf Zahl » Fri Nov 14, 2003 10:55 am

Nothing else was to be expected... ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randomlag » Fri Nov 14, 2003 11:10 am

Nothing else was expected :)

That was a very silly thing to say if you think about it, since all you ended up doing is doing exactly what you want to impugn the other person with. A logical person would instead show how my example is false, rather than attempt to denigrate.
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby Graf Zahl » Fri Nov 14, 2003 11:16 am

I'm certain someone here will correct me, most likely in a rude manner. But I'm pretty sure I'm right on that point.




;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randomlag » Fri Nov 14, 2003 11:21 am

Puberty reaction? :lol: That wasn't rude at all. "AFAIK" is generally accepted to be a conversational tone except to those wanting some sort of hormone feud.

Seems like you can't actually do a 1-1 debate. Sometimes you just have to acknowledge the other guy Graf. 35 years isn't a very long time to be too cocky.
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby HotWax » Fri Nov 14, 2003 12:20 pm

randomlag wrote:Nope. You again are not attempting to understand what I wrote (just like the PWAD thing). Try reading the post and not have your mind made up what I'm saying.


It's not that he's not trying to understand you. It's that he doesn't give a shit what you say, and neither does anybody else.

randomlag wrote:At not time did I say ALL of it was C, just that some of it technically is C.


Do you wake up in the morning crying because no matter how much you flap your gums you just can't seem to gain acceptance from 100% of the world?

randomlag wrote:Let's say I take a foo.C program, now I make it foo.CPP. Is it now C++? Of course not.


Nobody argued this point.

randomlag wrote:It's that simple Graf. Edit: Nor does combining it with "real" C++ code make it C++, no more so than the ZLIB linking example that you acknowledge does. Think outside of the box.


If the entire program won't compile in C, then it's not C. The fact that I can find this line (or something very similar) in just about every programming language on the planet:

a = b + 2;

Does not suddenly mean that THAT PARTICULAR PART of the program is Java. Or C. Or C++. Or whatever. You have to take the entire project as a whole. You're not stupid enough not to understand this, you just keep opening your mouth making yourself look more petty and stupid by the minute, and then keep blabbing hoping to justify the drivel you keep spouting. It's a vicious cycle really. Perhaps you should just stop talking.

randomlag wrote:The distinction is important to make to anyone not familiar with this topic,


Do you honestly think anyone not intimitely familiar with these forums really reads your posts? Once, maybe, and then never, ever again.

randomlag wrote:otherwise they might be led to the invalid conclusion later on.


I can see it now. Some poor guy is going to be in councelling because he was MISLED by some forum which made him believe that CPP = C++. Maybe it'll all just drive him insane, and he'll go on a killing spree, preferably starting with you.

randomlag wrote:That you avoid the distinction is more a matter of stubborness


Look, everyone! RL is talking about OTHER people being stubborn! :lol:

randomlag wrote:vs a simple fact as clearly illustrated by my example.


You jack off telling yourself how cool you are, don't you?

randomlag wrote:And yes some of the code in ZDOOM essentially underwent just that transformation.


What? Renaming from .C to .CPP, or commiting suicide after having to listen to you talk? I've stopped caring where you're going with this... No, wait... I've never cared.

randomlag wrote:And NO, you can't compile ZDOOM as C


Wow that's quite a concession for you. Maybe there's hope for you after all!

randomlag wrote: - never ever said that anywhere at any time.


Nevermind.

randomlag wrote:Just think about it. That's 100% the way it is.


Wow, that was a really deep thought. Hey, what if something that is totally inconsequential was true? Holy shit, thanks man. Now let's move the fuck on.

randomlag wrote:Btw,


...Sigh...

randomlag wrote:your are the one being pedantic with your repeated "superset", etc (something that was clearly obvious in the context of my post need not be repeated over and over and over).


Good, then shutup.

randomlag wrote:I was merely


...making a jackass of yourself.

randomlag wrote:pointing out


...that no one cares?

randomlag wrote:that the code is technically C and renaming it to CPP does not make it C++


Holy shit it's like we're on a never-ending merry-go-round sitting next to the most annoying person in hell.

randomlag wrote:Period. Now matter how stubborn you want to be.


There's that word again. I don't think it means what you think it means.

randomlag wrote:]And C++ support 99+% (maybe 100%) of the features of C AFAIK (assuming you fix type errors).


Oh, so in other words, you could compile a C program as C++ with pretty much no problem, so it could be said that C == C++, and this whole argument is moot? In that case, will you please shutup? If not, will you shutup anyway? Just... you know....... shutup.

randomlag wrote:Anyway, never had a problem changing from C to CPP (which is a lot of code).


... going and going and going and going and....

randomlag wrote:I have written approximately 1 million lines of code


Your mother must be really proud. 1 person down, 3,999,999,999 people to go.

randomlag wrote:none of which use "classes" yet all are CPP :)


Holy shit, you're inventing new arguments so that you can keep blabbering! Does the horror never end?!

randomlag wrote:I could switch them to C with very little effort.


And as you just pointed out, you could switch C to CPP with very little effort. WHY WON'T YOU STOP TALKING?

randomlag wrote:In fact, I switched about 300,000 lines from C to C++ also with very little effort since they were devoid of "C++" specific features.


Yay, congratulations! You successfully converted files that required no conversion! What did you do, rename them from CPP to C and call it C? Good for you! Now if you'll excuse me, I'm going to go nail my testicles to a wall, because it's more enjoyable than what I'm doing right now.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Graf Zahl » Fri Nov 14, 2003 1:02 pm

The repetetiveness of this kind of discussion reminds me of an old saying:


In a discussion with RandomLag:
======================
§1 RandomLag is always right.
§2 When in doubt, see §1.


PS.

You won't get any more meaningful input from me regarding this topic! :P Although the last post by HotWax really made me laugh. That was great, dude!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Nanami » Fri Nov 14, 2003 1:34 pm

Can we have just one thread where deep and HotWax DON'T argue with eachother?
User avatar
Nanami
Natdhipytadd
 
Joined: 15 Jul 2003
Location: That little island pritch created.

Postby Cyb » Fri Nov 14, 2003 2:23 pm

well isn't C also valid C++, I mean you can compile pretty much any C code in a C++ compiler (as long as you don't have any C++ keywords like new, delete etc used in the C code), so anything in C is also in C++ (C++ is a superset of C, check)... but then if you code something in C++ that isn't valid C, it's in C++. So C is C++ but C++ is not C, unless you code the C++ to be valid C, because C is C++, so C++ can be C, but only because you've coded the C++ in C, and since C is valid C++ you now have code that is C and C++, even though it doesn't use anything specific to C++, because C is C++.

What were we talking about again?
Cyb
 
Joined: 15 Jul 2003

Postby fraggle » Fri Nov 14, 2003 2:51 pm

Have you guys still learned nothing? Look:

"randomlag" once said:
I dont care about the paying thing. When I say I enjoy toying with
the replies, that's exactly what I mean. It's fun to twist their
words back at them and show them how contradictory it all becomes.
Yup, I'm just one SOB. Besides, I'm way too old to change now.
Don't tell.


YHBT. YHL. HAND.
fraggle
 

PreviousNext

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests