MahFreenAmeh
|
|
Reply #15 Posted on: June 02, 2010, 08:01:19 pm |
|
|
sysadmin
"Web Team" Location: Austin, TX Joined: Apr 2008
Posts: 13
|
Retro: References and pointers. Two ways to point to memory. Yes, they're both useful. No, they're not simple. Learning to use C++ isn't that hard, I agree. But understanding all of its little details so you never run into weird situations is extremely difficult.
luiscubal: NULL should never have existed that way in the first place, and it's all caps. nullptr could easily be null without causing problems with NULL. It's stupid to call it nullptr no matter how it came to be that way. Besides, that's the point.
hi my name is NULL and i am a macro
|
|
|
Logged
|
sys(tem)admin(istrator) [java,c++,c,javascript,html,css,php,perl,ruby,python,sql] if you've got ideas, let me hear them.
|
|
|
|
|
RetroX
|
|
Reply #18 Posted on: June 03, 2010, 02:39:00 pm |
|
|
Master of all things Linux
Location: US Joined: Apr 2008
Posts: 1055
|
C++ can be used exactly like Java. Object can be used to access any type, which can be coded in C. It's just that C doesn't force you to use it. Same thing with length and jagged arrays and other random, useless features that Java has. You can do them in C++, but they're not forced.
How is C++ bloated? It's "more bloated" than C, yes, but Java is far more bloated than either. I don't quite understand your logic, here.
"Bloated" would mean "has more features than reasonable" in my opinion, and as far as Java goes, a lot more features are default than necessary. Yes, it has several extra, useful functions that aren't in the C++ standard libraries, but the default functions that Java automatically uses are way too much.
|
|
« Last Edit: June 03, 2010, 02:53:51 pm by RetroX »
|
Logged
|
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)Why do all the pro-Microsoft people have troll avatars?
|
|
|
luiscubal
|
|
Reply #19 Posted on: June 03, 2010, 03:37:55 pm |
|
|
Joined: Jun 2009
Posts: 452
|
It's not a matter of what you use. It's a matter of what it has. Sure, I might avoid pointers in C++, but C++ has pointers. Pointers are part of C++ obesity. I might avoid trigraphs in C++, but C++ has trigraphs. Trigraphs are part of C++ obesity. I might avoid friend classes and functions in C++, but C++ has friend classes and functions. Friend classes and functions are part of C++ obesity.
C++ has grown too big. Layers on top of layers on top of layers on top of layers, for the sake of legacy. C++'s age is noticeable, even more so because it kept so much from old C.
Sorry to say this, but C++ has become obsolete. Is it worse than C? I'm not sure. It has decent features C hasn't, but does all the crap it adds worth it?
And it's a shame. Because we could really use a low-level programming language with a few high-level features. But almost nobody cares. C++ is mostly for legacy. Languages like D never became "the next big thing", because programmers meanwhile discovered better alternatives such as GC-able/JIT languages(that, and the fact that D libraries suck).
|
|
|
Logged
|
|
|
|
RetroX
|
|
Reply #20 Posted on: June 03, 2010, 03:59:17 pm |
|
|
Master of all things Linux
Location: US Joined: Apr 2008
Posts: 1055
|
Java has loads of extra stuff, too.
I don't understand why having the ability to do stuff is worse than having too much that is forcibly included.
In C++, I can code terribly and make a class for every group of functions, but it's not forced. In Java, you're forced to.
In C++, I can create a base object class that all other classes inherit, but I don't have to. In Java, it's done automatically, whether or not that you need it.
|
|
|
Logged
|
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)Why do all the pro-Microsoft people have troll avatars?
|
|
|
|
|
|
|
|
|
Rusky
|
|
Reply #27 Posted on: June 03, 2010, 08:52:09 pm |
|
|
Joined: Feb 2008
Posts: 954
|
"C++ is designed to give the programmer choice, even if this makes it possible for the programmer to choose incorrectly" -Wikipedia "C++ does not incur overhead for features that are not used (the "zero-overhead principle")" -Wikipedia
C++ is great because it lets you do anything you want, while at the same time not slowing your game down with extra stuff you don't want. If you don't use something, it's as if it never existed. Sure the bloat can be a bit of a burden for someone learning c++, but it's also a burden having to learn all the many languages and their programming styles which c++ easily covers. C++ puts everything together, while giving YOU the choice of what you want to do. If you don't like c++, then don't use it. I think it's quite obvious that the c++ supporters here aren't going to change their mind, so there's not much point arguing. These ideas are completely orthogonal to being bloated. Bloat is a problem for everyone- you can't just ignore features others use. Nobody's arguing against C++ anyway. Just that it's bloated. We all use Windows at some point or another- I'm fairly sure everyone here agrees that while it runs nearly everything you want in some form or another, it's got a lot of stuff you don't want and a lot of stuff that's designed stupidly. It's the same with a lot of useful systems- nothing is perfect, and bloat is a pretty popular problem to have.
|
|
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #28 Posted on: June 03, 2010, 09:04:16 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
As a language, C++ is fairly bloated. That bloat doesn't really get in your way unless you are trying to parse it. The output is typically far from bloated, though there are slight amounts of overhead if you utilize more than C would give you alone.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|