4 ms·
It's tricky and there is no one-language-to-rule-them-all because they have up- and downsides. C++ has the advantage of an incredible amount of code written in
by skriticos2 12y ago
It's tricky and there is no one-language-to-rule-them-all because they have up- and downsides.
C++ has the advantage of an incredible amount of code written in over the years that mostly works. It also executes fast. It's also easy to find developers for it. With the new addons to the specification it's even possible to write readable code with it.. However, it has a stupidly long, verbose and feature creepy standard (well over 1000 pages), which results in no developer reading it. Because of it's design, compilation times tend to take long (as a ridiculous amount of headers are included even in the most simple applications).
Go is pretty much the opposite. It has a lean and readable spec (on purpose) and a fairly common canonical syntax without much discussion about it. Because it's relatively new, there is not much written in it however. It has some specific strengths, like a concurrency implementation that abstracts most of the process/thread/mutex stuff. With this, it does appeal to new projects that don't depend on libraries written in other languages. There is no point in porting multi-million SLOC applications to Go though, as that would be incredibly time-consuming. It has the potential to surpass C++ in a few decades though, as it operates in the same domain (systems programming).
Python is a versatile scripting language. It has nice syntax and is incredibly flexible at manipulating data. Add to it the well documented, feature-rich standard library. With it you can evaluate data with incredible flexibility and it has a fairly complete feature set for general programming tasks that span multiple OSs. The downside is that it's slow in execution and needs the interpreter along the scripts. Especially for smaller tasks and simple automation it is the first choice however because of it's small footprint in constraints (you can just edit and drop a scriptfile anywhere on a Linux system and it works).
Java.. I'm not entirely sure what Java does well. I hear praise for the JVM, but generally I get the impression that it is plagued by legal issues, alien looking GUI tools, more than verbose syntax and it also has a stupidly long specification (almost half of C++'s). Maybe someone can shed light on this one. Tools maybe?
- nly 12y agoThe C++ language specification is only ~450 pages, the rest of the ~1200 or so pages is the standard library specification. > Java.. I'm not entirely sure what Java does well. * Package/module system is dead "drop your JAR here" simple. * Humongous standard library. * Oracle provide a really powerful free JIT (probably still one of best for real world performance when it comes to JITing static languages) * Standardised language specification (like C and C++) * A well specified, really simple bytecode that other compilers and runtimes can target. * It's a newbie friendly, procedural, object-oriented language that encourages 'patterns' that make developers feel comfortable and that they know how to tackle problems (whether it's the right way is another matter) * Relatively safe, meaning there is less to learn (no pointers, memory management, arithmetic overflow etc).
- humanrebar 12y agoI'd disagree that Go is a systems programming language in the way that C++ is a systems programming language. As in, I'm not sure you would implement a garbage collector in Go. However, both Go and the typical processor are evolving, to that may change over time. To be fair, if I were wanting to find all matches for a regular expression in a given text file, I sure wouldn't use C++, even though C++ is certainly capable of doing that.
- AlexeyBrin 12y ago> [Go] It has the potential to surpass C++ in a few decades though, as it operates in the same domain (systems programming). Nope, Go and C++ operate on different domains, Go is garbage collected and nobody will use it for low level system programming.