3 ms·
That's interesting to me that so many people dislike C++. I prefer it to Java (which I find extremely verbose), don't think its features are really that comple
by fossuser 16y ago
That's interesting to me that so many people dislike C++. I prefer it to Java (which I find extremely verbose), don't think its features are really that complex and like its speed. I think it's a powerful object orientated statically typed language.
It seems when compared to other statically typed languages (it doesn't really make sense to compare with dynamically typed languages) C++ does a good job. The STL prevents you from having to reimplement many things you might otherwise need in C and the syntax is more natural or intuitive when compared with C as well.
I have a feeling people just prefer what they're familiar with and make sweeping generalizations or exaggerated claims about other languages and technologies.
- cageface 16y agoA lot of C++ bias lingers from the days when compiler support for more sophisticated features like templates was very immature and buggy. C++ is much more pleasant to code in now than it was when I first used it in 1997. I certainly wouldn't want to write a webapp in C++, but for anything that requires speed and direct control of memory C++ is still really the only game in town and I quite enjoy it when it's the right tool for the job. People describe Objective-C as "c with objects" done the right way but I'd much rather code in C++ than Objective-C. I also don't really understand why people say they prefer to write in pure C, at least not in 2011. Hacking together a homegrown OO system in C with structs and function pointers and macros doesn't sound any easier or simpler to me.
- fossuser 16y agoThat makes a lot of sense. I hadn't thought of its past when the compiler wasn't as solid as it is now. I suppose I'm spoiled by the fact that a lot of that had already been completed by the time I started coding.
- rubashov 16y ago> wouldn't want to write a webapp in C++ Actually, POCO has all the stuff you need to write a web-app: templating, form handling, http request/reponse objects, etc. Not that I've done it, but it looks like you could write a web-app using POCO::Net rather painlessly. I like C++ and don't understand the frustration others express. I don't use a subset, and neither do the other people I work with. We use pretty much the whole thing, TMP, macros and all. Being well familiar with C++ I can never see a clear reason to prefer something like Java. Qt is better for GUI stuff. POCO is just as good, or better, for network stuff. With C++ you can go ahead and marry the host platform's system calls when that makes sense (i.e. write a unix program). When it comes to scientific or graphics type libraries it seems like the premier solution usually has a first class C++ interface. The Java equivalents seem harder to evaluate. I did a bunch of GIS stuff recently, using proj.4 and various other things. It sure appears to me that the Java/C# equivalents of the GIS type libraries are less supported and less popular ports of the C++/C ones. If you have perl/python and C++ in your tool belt, I just don't see the need to reach for the so-called C++ replacements. Aside from hiring considerations, that is.
- cageface 16y agoBeing well familiar with C++ I can never see a clear reason to prefer something like Java. I also much prefer C++ as a language but garbage collection is such a huge productivity win that I'll always use a GC'd language if it's appropriate. No matter how cleverly you abstract manual memory management away in C++ it's still a real chore and a source of bugs.
- deleted 16y ago[deleted]
- huherto 16y agoIn which way java is more verbose than C++? People in Java tend to choose longer names but, that is more programming style than something in the language. In C++ you have to declare your functions in a header, then you have to do it again in the .cpp, I dislike it because if I change one I have to change the other one.