What makes C++ so powerful?

Started by
147 comments, last by CoffeeMug 17 years, 11 months ago


Quote:
You must be doing something wrong. Just a few seconds for 1000 lines of code and you call that fast? That's strange, because I can compile 1081 method lines of code in ONE SECOND with java. Definately faster than C++ for me.

I worked with EJB. 1000 class compile in 20 minutes on 1,5 GHZ. Hmm. Its damm fast... Like thunder almoust ot speedy gonzales...

BTW are you talking about 'method lines of code', or does 1000 lines include blank lines, method headers and curly braces? In that case, I have 2247 'lines of code'.


Quote:
Wait a minute, are you the same guy from the "Java is fast"-thread that deletes every Java program he encounters? :)


Its just a free marked dude. I have multiple c++ based progtrams that do the same. I will use them instead. I wont spend my day configuring virtual maschines...
Just dont be a fool.


Quote:
Remote Method Invocation? I'm not exactly sure what you mean.

Single maschine??? you only know monolitic single gui application???


Quote:
databases are anything but simple!

hah. Yes its terrible work to do and people does spend years on learning how to use databases.:) Be sourius:)

Quote:
It's a blessing Java does not allow direct memory access, no more access violations.


Quote:Original post by Anonymous Poster
What about changing variables in hand directly from memory?

What a terrible thing to do. A Java programmer does not think in terms of memory addresses ;)

What about making visual effect by changing memory. Some tricks known well from many years.


Quote:
Writing structs to a file does not seem very OO to me. But of course you can write to binary files in Java.

I know that but that not solve writing struct prog...

Quote:
Please give an example, I'm really not following you.

hmm exaple of parsing??? communications stuff. I dont need to solve it that way... In internet communciation it makes sence while on single maschine non.



Quote:
Did I call you crazy because you use C++? I'm sorry if I did.

Read whole discussion. You are not the one.

Quote:
Dont say its worst only because you don't like market using something that you don't know...

Again many pople talk here. Not only you


Advertisement
Quote:Original post by Anonymous Poster
Hey. I just got into this place because RPG-Dev has been blocked from the connection I'm using (Z!re hates me...). I would log in but the place where my email is is also blocked. I know this is kinda off-topic, but just about everyone says Java is better than C++. I don't get it. Java isn't better than C++ in anything that I can think of. Albeit that it is better in rendering 2D graphics, but still...

I have a question. Does anyone think that Java is better than C++? Or is C# better than Java? Or is C# better than C++? Which one is best?


None of them are "best". Best for a certain situation, yes, but none of them is the "best" overall.

Also, why do you say that Java is better at rendering 2D graphics? AFAIK it's no better than C++...

[offtopic]AFAIK Z!re isn't an RPG-Dev admin... Also, why would she ban you? Maybe it's your connection. Are you at school, or work? If it's at school, the school admins probably banned the site for some reason.

Unless you're... Seph?...
[/offtopic]
Quote:Original post by Anonymous Poster
Quote:
Remote Method Invocation? I'm not exactly sure what you mean.

Single maschine??? you only know monolitic single gui application???

There seems to be a language barriere between us...
If I want to communicate with other programs, I use Remote Method Invocation. But I'm not exactly sure that this is what you were talking about. And what is this stuff about 'single maschine' you are talking about? I know how to develope distributed applications.

Quote:
Quote:
databases are anything but simple!

hah. Yes its terrible work to do and people does spend years on learning how to use databases.:) Be sourius:)

Entity-Relationship-Model, Relational Database, Normal Forms, Query Languages, Distributed Databases, Data Warehousing, Data Mining... yes, you can spend years learning this stuff if you are really interested in it.

Quote:
What about making visual effect by changing memory. Some tricks known well from many years.

Please give me an example.
*yawn* dear god C++ "so powerful"? D better C++? [lol] please don't make me laugh. Whats even more funny is the majority of posters on this thread who claim C++ is "so powerful" yet probably do not know how to use C++ to it's full potential (even though it's butt ugly) and probably wouldn't without another ~3-5 years practice/training of all of C++'s obscurities/idiocrasies. Just give'em a header from one of boost libraries that generates code from a mix of macro & template metaprogramming and they lay a brick in their paints....

Nothing to see here move along, move along *yawn*.
Quote:Original post by jwalsh
Quote:Original post by tstrimp
Quote:Original post by jwalsh
Quote:
VB provides a WYSIWYG editor which makes it easier for people to jump right in and see results.

So does C++ and C#.

Cheers!


He was making a comparison between C++ and VB therefore C# was out of context. I believe VC++ has a WYSIWYG editor but C++ in general does not. Of course the WYSIWYG editor for VB could also be seen as an IDE feature but VB is tied to that particular IDE a lot more then C++ is to any IDE.


Basic doesnt have a WYSIWYG editor. Visual Basic does. Hence the "visual" part. C++ doesnt have a WYSIWYG, but Visual C++ does. They are the same thing really, and not coincidentally, both Microsoft inventions - and both standard with "Visual Studio." Its just that Borland/Inprise and other IDE makers have created their own "visual" tools for C++, while no one has bothered with Basic that I know of.


Visual C++ does not have WYSISYG

The OP asked "what makes c++ so powerful" not "Hey everyone, lets start another thread on why your language it the best!"
A little more than one year ago, I didn't want to give another language than C++ even a try. The reason was that C++ simply is so much cooler (from a newbie viewpoint) than C# for instance.

After some C# praisings on this forum however, I gave it a try. It doesn't take long until you love it. And that is before you grasp how to use events and anonymous methods and other not-so-C++:ish features.

<shameless ad>If you want a concrete example on how clean C#/.NET code is albeit non-trivial functionality, check out my latest release on my website, Dreyeve 2.0. It is a multi-threaded folder size analyzing tool, written entirely in C#, and open source.</shameless ad>
[s]--------------------------------------------------------[/s]chromecode.com - software with source code
Quote:Original post by Fruny
Quote:Original post by NotAYakk
12. Lack of standardization on a good string class. (std::string has issues)


You know what's funny? People will criticise (let's say) C++'s string class, but not languages which have a built-in string type. Yet, at the end of the day, there isn't much difference between a library solution and one that's built into the language.


I don't mine strings being a library feature.

What I mind is that std::strings aren't a good enough string class.

Maybe they have gotten better. But, lets think:
1> Passing std::strings between DLLs.
2> The requirements for the last version of the std::string standard where unimplementable (probably fixed by now)
3> Legacy support for char*s cripples sub-strings. Null-termination should be terminated. No, really.
4> Good copy-on-write (or a class of non-mutable strings) semantics

There are candidates for good string classes. Ropes and the like.

But I find that C++'s std::strings are not all that much better than std::vector<wchar_t>s.
Quote:Original post by Enselic
A little more than one year ago, I didn't want to give another language than C++ even a try. The reason was that C++ simply is so much cooler (from a newbie viewpoint) than C# for instance.

After some C# praisings on this forum however, I gave it a try. It doesn't take long until you love it. And that is before you grasp how to use events and anonymous methods and other not-so-C++:ish features.


That's exactly how I've always felt :P But I have started programming Visual Basic.NET now using Visual Studio 2005, and I LOVE it! I haven't come far yet, but I understand that it's not a shame using WYSIWYG (or whatever it was called) editors, it's just practical and easy. I still have to write code to get stuff to actually do something but I can design it easy and comfortable with drag-and-drop and I don't have to write all the super-ultra-mega-boring code, just the fun code :)
Quote:Original post by snk_kid
*yawn* dear god C++ "so powerful"? D better C++? [lol] please don't make me laugh. Whats even more funny is the majority of posters on this thread who claim C++ is "so powerful" yet probably do not know how to use C++ to it's full potential (even though it's butt ugly) and probably wouldn't without another ~3-5 years practice/training of all of C++'s obscurities/idiocrasies. Just give'em a header from one of boost libraries that generates code from a mix of macro & template metaprogramming and they lay a brick in their paints....

Nothing to see here move along, move along *yawn*.


When I try to form some broader picture of what programming is about, what are the different paradigms, idioms, styles, etc., it is sometimes hard to get unambigous information about C++. I mean, I know I won't actually understand everything for a long time to come, but still I can try to get some idea about the general concepts. With some common sense it's possible for a relatively inexperienced coder like myself to figure out which are the people who know what they talk about and get a glimpse of what they talk about.

The funny thing is, more often than not this whole language and programming style debate is so ideological that one unmistakenly intelligent group of people will (subtle or not) flame other intelligent people with a different viewpoint, implying they are morons (and vice versa).

It's sometimes pretty hard to find decent, nuanced information about advanced uses of C++ and how that relates to the bigger picture of Java, C# and even functional programming. There's the functional vs. imperative flamewars, the anti-microsoft vs. anti-anti-microsoft thing, control vs. productivity and whatnot. Okay, not good examples but the point is the ideological nature of these opposites.

So I suspect that often these opinions about programming languages are actually more about the attitude and identity of the programmer than the language itself.

As a final remark, I also don't believe 'use the right tool for the right job' is an adequate answer. Sure all these languages have different purposes, AND the concept is more important than specific implementation, but as languages are tools, I would say it's possible to remark upon how well a tool succeeds in being instrumental to achieve the purpose it was designed for. (Or, more interesting perhaps, achieves purposes that are discovered. As I understand is the case with macro+template metaprogramming in C++).

I'm sorry if this comes of as a rant, it wasn't intended to be. I find the uses to which people put languages (ways of expressing concepts) and the design of language fascinating, even if hard to follow sometimes. The amount of ideology makes that alot harder.
Quote:Original post by phantom
Quote:Original post by nmi
What about D ?
http://www.digitalmars.com/d/index.html

It provides the features of C/C++, can link against C-DLLs, allows to transparently use COM-Objects, allows the use of templates (with a much simpler syntax than C++ offers) and much more.


And as I pointed out earlier, everyone keeps saying 'D will be big soon!'... it still isn't...


It lacks the community. There are too few people willing to create new projects using D as programming language. But this may change. From a technical standpoint D looks very promising.

And you should remember that Java also needed a second start (the first version was called 'Oak' if I remember correctly).

Also C++ needed some time to replace C in many programming domains. And C is still there in some areas, i.e. in embedded systems programming.

This topic is closed to new replies.

Advertisement