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 / Why people hate C++

Author
Message
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 4th Jan 2008 15:41
With any remotely modern IDE features like Auto completion / Intellisense (whatever floats your boat) have made case sensitivity virtually a none issue.

Darth Kiwi
19
Years of Service
User Offline
Joined: 7th Jan 2005
Location: On the brink of insanity.
Posted: 4th Jan 2008 17:59
Quote: "That is clearly false. Binary is simple. Why aren't you coding in raw binary? Because it's slow and a waste of time. i.e inefficient."

Although my knowledge of the inner workings of PCs is scant, I always thought that the closer code was to binary, the quicker the computer could run it, ie. the more efficient it was. That is what I understood was meant by efficiency. HOWEVER, you are quite right: we have to sacrifice some efficiency (or speed, if you want to term it thus) in order to make the coder's job easier.

Another reason people might hate C++ (although that's a bit strong for this example) is that noobs might hear that "C++ is more powerful, and gives you more control than DBP" so then the noob goes off, all high and mighty about how he's going to trounce all us poor DBP users with his magical C++ knowledge which is, of course, going to just fall into his head and make him the greatest coder of all time. However, this is far more likely to incite hatred of big-headed, naive noobs rather than of C++ which, let's face it, isn't responsible for said noob's behavior.

I'm not actually a Kiwi, I just randomly thought it up one day.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 4th Jan 2008 18:00
I naturally program case sensitive, it drives me crazy if variables or functions don't look the same. People that exclusively and dogmatically stick to Basic learn some ugly, sloppy habits.


Come see the WIP!
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 4th Jan 2008 19:15
I only just found out that BASIC isn't case-sensitive .

@Kiwi: What?! Oh, of course. It is always the noobs.

But I meant why people think it is so impossible.

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 4th Jan 2008 20:41
Why would I bash C/C++?

I can and have coded in both, and every second is a total nightmare in comparison to something like DB. Sure, you can do more, but it'll take you at least four times as long. Usually much more. There's no array range checking (at least from my experience) and you have to go about, chasing up libraries. Debuggers hardly work. "HelloWorld.c" is screenfuls of unreadable junk, checking for messages from Windows and loading extensions. It's rubbish, and if anyone tells you it's the industry standard, it's true but it shouldn't be. Anyone with the least of business sense would take one look figure out that coding an application in a simpler language takes less time, and therefore costs less. At the risk of starting a cliche, idiots.


Since the other one was scaring you guys so much...
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 4th Jan 2008 21:14 Edited at: 4th Jan 2008 21:18
Quote: "but it'll take you at least four times as long"

Not when you know the language properly.

Quote: "and you have to go about, chasing up libraries"

You do with any language, unless it has the libraries built in.

Quote: "Debuggers hardly work."

That's a stupid generalization. There are many working debuggers out there. VC++'s debugger is good.

Quote: ""HelloWorld.c" is screenfuls of unreadable junk, checking for messages from Windows and loading extensions."



These kind of statements indicate that you haven't used C/C++ for very long.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 4th Jan 2008 21:18 Edited at: 4th Jan 2008 21:19
Quote: "I can and have coded in both, and every second is a total nightmare in comparison to something like DB. Sure, you can do more, but it'll take you at least four times as long. Usually much more. There's no array range checking (at least from my experience) and you have to go about, chasing up libraries. Debuggers hardly work. "HelloWorld.c" is screenfuls of unreadable junk, checking for messages from Windows and loading extensions. It's rubbish, and if anyone tells you it's the industry standard, it's true but it shouldn't be. Anyone with the least of business sense would take one look figure out that coding an application in a simpler language takes less time, and therefore costs less. At the risk of starting a cliche, idiots."


1) It doesn't take 4 times as long. We've said this so many times in this thread alone. Sure, if you feel compelled to write from scratch, it will. But you don't have to. You seem to assume that there aren't libraries you can use to make things quicker - which there _are_

2) The most basic form of arrays ([]) don't have range checking, that's true. And? If you want range checking, use something from STL (vector, list, map etc.). It's not tricky :/

3) Debuggers not working? Which debugger are you using? Unless you destroy the stack, C++ debuggers are some of the best out there (MSVC has an especially powerful debugger). Also, if we're comparing to DBP, C++ debuggers (in general) blow DBP totally out of the water debugger-wise.

4) "HelloWorld.c" is screenfuls of unreadable junk" <-? What's that supposed to mean? You don't get the language so it's 'screen fulls of junk'?

You can do hello world in a few lines



09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 4th Jan 2008 21:19
Wow, Nex, that was the most ignorant post in this thread yet

Why would you need array range checking? By the way you can do that if you wish using the standard template library, but I don't see a reason why you'd need it.

From reading through this thread, I've found the majority of people who say it takes "4 times as long", etc. etc. do not actually know what it takes to write a game in C++. It is difficult to do *properly*. Anyone can whip up a HelloWorld.cpp and think they understand C++. But if you actually understand the fundamentals of OOP (inheritance, polymorphism, data structures, etc.) then you'd instantly see the advantage over DBP.

And there are tons of free APIs like Irrlicht, Ogre, etc. that allow you to whip up scenes just as fast as DBP. The time argument is MOOT as most people do not need to write their engines from scratch obviously.

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 4th Jan 2008 21:25 Edited at: 4th Jan 2008 21:26
Quote: "Why would you need array range checking? By the way you can do that if you wish using the standard template library, but I don't see a reason why you'd need it.
"


Which reminds me; The core 'idea' of C and C++ is that you only pay for what you use. Array checking incurs a cost on performance. So by making it optional, you're gaining performance, and not losing any with a feature you may not want/need. That's why it has no range checking.

If you want it, code it up yourself (e.g. an array class or something) or use an STL class etc.


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Jan 2008 21:26
Quote: "But if you actually understand the fundamentals of OOP (inheritance, polymorphism, data structures, etc.) then you'd instantly see the advantage over DBP"

Cheers! well said. And I agree with the C++ guys on this one, even tho I dont code in cpp. It is the predecessor and the basis of the language I use most (vb.net, and of C#), which also contains all of these true OO concepts mentioned above.

My DBP plugins page is now hosted [href]here[/href]
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 4th Jan 2008 21:37
I understand your arguments, and maybe I was a little ignorant. At the end of the day, C, C++ and C# aren't my vision of ideal languages. Call me backward, but I'd rather use something that makes use of plain English.


Since the other one was scaring you guys so much...
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 4th Jan 2008 21:54
^ WTF@ Debugger statement. Does DBPRo even have a working debugger?

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Jan 2008 22:05
Wait.. array range checking.. why hasn't anyone mentioned sizeof()?

Your signature has been erased by a mod
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Jan 2008 22:28
Quote: "Call me backward, but I'd rather use something that makes use of plain English."

try VB.NET then, less syntax headaches, all the power of OOP and the dgdk.net to boot

My DBP plugins page is now hosted [href]here[/href]
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 4th Jan 2008 22:41 Edited at: 4th Jan 2008 22:43
Quote: "Wait.. array range checking.. why hasn't anyone mentioned sizeof()?"

Only useful for static allocations.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 4th Jan 2008 23:22
Bear in mind that C/C++ are for a large part meant to reflect what's going on in the under the hood in the system, with the machine language and all. This mean's that it's not going to do a lot of stuff for you, it's going to do what you tell it and nothing else, and then leave the programmer-friendly types to be handled by libraries like STL, instead of building it into the language.

Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 4th Jan 2008 23:41
C++ I think is easy when you get the hang of it - as most things are programmed in it (even other programming languages), I don't see why you would make a post like you did Nex. Yes you have to type more and it is more difficult, but when you're coding you'll pick up a lot of advantages from how it works. Things like DBP are simplifications, professional programmers will want a wide functionality, and a means to organise their code - C++ is industry standard because it's the best compromise between human language and machine code. DBP in comparison and certain alternatives, even C# has more limitations. (In fact I find C++ easier than C#)

Playing with libraries like Irrlicht and Ogre can be really good for libraries in C++. But of course, I prefer using DBP as I am a hobbyist after all it's convenient.

mjoðr er lekker
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 5th Jan 2008 01:44
I think some of the people here saying C++ isn't that hard don't actually know that much C++.

It's true that it isn't that hard to start writing programs in C++, I mean, you can basically write the same code as in BASIC just with slightly different syntax, people get to that stage and think, bloody hell this is easy.

The thing is, some of the harder aspects of C++, the sort of stuff you need to do in order to program at an industry standard *are* very hard.

Managing memory, working extensively with templates and derived classes etc.

People learn how to make a templated class and then think they completely understand them. It's not the same thing.

It's the difference between being able to integrate and being able to integrate sqrt(tan(x)).

-= Out here in the fields, I fight for my meals =-
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 5th Jan 2008 02:25
Define "Knowing much", and i'll get back to you on that. I assume you mean using most of the STL and loads of APIs?

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 5th Jan 2008 05:33
c++ is way too complicated and there is too much to learn about it. DarkBASIC Classic is much better because it is simpler, easier to learn, and less time-consuming.

Seriously, how do you make the little blue text come up below your message?
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 5th Jan 2008 05:34
Quote: "c++ is way too complicated and there is too much to learn about it. DarkBASIC Classic is much better because it is simpler, easier to learn, and less time-consuming."

Did you read any of the posts?

The best things in life are edible.
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 5th Jan 2008 08:04
I recommend anyone here who thinks they know C or C++ to take a snoop inside some of the source files for Linux. Pretty soon I will guarantee you'll change your mind

andrey d
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location:
Posted: 5th Jan 2008 08:43 Edited at: 5th Jan 2008 08:46
Quote: "I think some of the people here saying C++ isn't that hard don't actually know that much C++.

It's true that it isn't that hard to start writing programs in C++, I mean, you can basically write the same code as in BASIC just with slightly different syntax, people get to that stage and think, bloody hell this is easy."

I don't want to spend months learning C++. I don't have the time for it, nor the drive to do so when I can just make the exact same thing with DBP. I don't care if my creation runs slower, the hell with speed if it takes me months more to get going. At the end of the day, I just want to sit down and make something work, something that I can come back to and actually have an idea of what the hell's going on, and not tear my hair out. I'm sure OOP is super duper awesome and that everybody is gonna use it and it's all gonna be cool, and that BASIC makes you get bad habits. I'm not making games to sell, hell if I was, I'd learn Python, Pygame, and PyOpenGL, I just want visible results as soon as I type, and DarkBASIC has been able to provide me with that, better than several other languages I've tried. First 5 mins with C, C++, VB, made didly squat. First 5 mins of DBP, made a little scene with colored objects, able to move camera around. That makes all the difference in the world to me. I have all the control that I need in my programs, why on earth would I need more? If anybody reads all of this, give me a reason why I should learn C++.
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 5th Jan 2008 09:04
Well, in your case you should stick with DBP then.

Nobody here is stupid enough to say everyone should learn C++. If your ambition is to do indie games for fun or for a little side money, DBP is a great tool. It's also perfect for quickly whipping up a prototype. However, in the game industry C++ is king. Not everyone aspires to be in the game industry, and that's perfectly fine

Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 5th Jan 2008 11:12
Quote: "Define "Knowing much", and i'll get back to you on that. I assume you mean using most of the STL and loads of APIs?"


No, that's exactly not what I mean.

I mean being able to write and understand complex code, and have a good understanding of how to manage memory fast and effectively, how to get the best performance out of multiple threads.

I'm not claiming that I can do all these things, I can't, that's the point. I know I am not that good at C++, despite probably being better than some of the people here claiming that it is "easy".

-= Out here in the fields, I fight for my meals =-
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 5th Jan 2008 16:11
@Chris: I don't think I said it was easy...? If I did, then quote me. I mean to say that C++ isn't really that daunting a language as a lot of people make it. True, that if you look at the source code for a video game that was commented for the person who wrote it, it is difficult to understand, but the same goes for DBP. Just go look at the source code for FPSC. At first glance it most likely looks like gibberish until you can effectively figure out the mechanics of the code. Oh, and you have to define Complex as well. Do you mean code handling foreign concepts? Or just a huge amount of code?

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 5th Jan 2008 17:19
Quote: "standard *are* very hard.

Managing memory, working extensively with templates and derived classes etc."


After a while, these things become ingrained, and it literally becomes second nature. As I said before - you get so used to it, when people say "OMG, DIFFICULT!" it's quite hard to see why, because you're used to it etc. and it seems fairly simple.

Also, it's good to note that your experience will differ depending on what you're coding with it. Obviously we're all after coding games, but something particularly complicated / maths heavy can indeed get very difficult to code (then again, it's not really a walk in the park with most languages, but still)


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 5th Jan 2008 20:49
Templates, virtual and pure virtual functions, inheritance with polymorphism, advanced data structures, operator overloading, advanced memory management, etc. There are so many things about C++ that I'd be hard pressed to find anyone who thinks it's easy. That is, if they know what they're talking about.

And C--- don't get me started. Memory management with C is quite complex.

Even little things at a job interview might seem easy at first, but a little tricky to be fully optimized.

For example, write a string reverse function in C (not C++), using the least amount of lines of code. It seems simple, but when you write it out WITHOUT A COMPILER it can be tricky.

Login to post a reply

Server time is: 2024-11-19 19:23:37
Your offset time is: 2024-11-19 19:23:37