5 ms·
Not directly related, but a question that popped up while reading this: As a C++ programmer I'm quite happy to see the language keep improving in quite a good
by jerrre 9y ago
Not directly related, but a question that popped up while reading this:
As a C++ programmer I'm quite happy to see the language keep improving in quite a good pace, but I'm wondering if anyone can shine some light on how this evolution compares with other widely used languages.
Of course newer languages can change drastically quite fast (Swift comes to mind), but I don't follow more accomplished languages (PHP, Java, JavaScript, Python, Even C, ..., sorry if I didn't name your language) close enough to get an idea.
- deleted 9y ago[deleted]
- grabcocque 9y agoThe poster below can go fuck himself.
- unfamiliar 9y agoThe question was about how evolution of each language was handled, not a general comparison of languages.
- grabcocque 9y agoHence why I said "I'd say Rust is pushing in the same direction of travel as modern C++"
- dang 9y agoWe ban accounts that vandalize HN with comments like this one. Please read https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and don't do this again.
- dtech 9y agoThat's quite a list of languages. Here's my opinion on a few that I know: My impression of C++ is that is evolves fairly quickly, but also includes everything, the kitchen sink and the highway, making for an expansive and complex language. Scala gets some of the same flak. Java evolves glacially, and outside of very rare large improvements (e.g. lambda's in 8) it's still the same (verbose) language and will remain for a long time. PHP evolves fairly quikly, but the API's aren't consistent leading to a bit of the "flavor of the week" feeling for new additions. I don't know how this has been since PHP 7+ Javascript is evolving at a rapid pace, but despite that they seem to move toward a clear goal with nice functional API's and constructs being added to the language.
- FranOntanaya 9y agoPHP 7+ hasn't added that much in terms of new APIs — (e.g. libsodium in 7.2, and it's typical function(target, arguments) stuff). It added strict typing and a very significant bunch of ergonomic/performance changes. I'd say half the reason to call it a quick evolution is how fast it's being adopted compared with the glacial progress from 5.2 to 5.6, or Python 2 to 3. Also a third half of the freshness has been adoption of packaging and coding standards.
- criddell 9y agoTo me, C++ felt stuck for a pretty long time during the 2000's. Maybe that was due to being stuck in Microsoft-land. These days, C++ on Windows is great.
- ksherlock 9y agoc++(19)98 was the first c++ standard. There was a minor update in 2003 to fix the most obvious defects. The next standard was c++11. If it felt stuck in the 2000s, it's because it was stuck in the 2000s. And it wasn't just Windows/Microsoft - To this day, gcc 4 (-std=c++0x if you want some c++11 features) is the standard compiler for many Linux sites.
- eco 9y agoThe reason that the standard stayed unchanged for so long after 2003 is that the committee had a misunderstanding about some ISO rule and thought they couldn't release new versions for some period of time. I can't remember the details but Herb Sutter has mentioned it during conferences.
- zanny 9y agoC++ is old. It inherits most of C, which is also old. No other language has had to maintain backwards compatibility for roughly ~40 years, through generations of programming paradigms, while also trying to stay relevant. Modern C++ is a ton of new functionality mostly because its adding another paradigm to the language - since C++11 it has gotten much more functional. Just look at how Python ended up if you want to see what happens when you try to backwards-break a language. And C++ is oh so much worse at that - if you make a non-compatible language iteration it would also (probably) break the ABI, which means "new" C++ cannot link old C++. It would make two languages. And nowadays, you really only have one of three reasons to write C++: * You already have a C++ project. * You need to use a C++ library / supporting code / integrate with C++ directly (and not through a C API). * You want a feature only a C++ construct / library can provide. Qt is a great example of this, because there really is nothing comparable to it on any other platform in terms of a cross platform native UI toolkit, and using bindings can work but introduces a lot of build system complexities. So C++ has all the reasons to adopt new paradigms to make life easier for those who have to use C++, but breaking backwards compatibility defeats all the core reasons you want to use the language. A prettier language is useless if you cannot get real work done in it.
- fatbob 9y agoHow about real-time control? What's the alternative?
- pjmlp 9y agoAda, SPARK, Pascal, code generation using formal model, in some soft-real time cases Java (RTSJ 2.0). But it will be an up-hill battle if not working alone, unless one is working in high-integrity related industries.
- jononor 9y agoHopefully Rust will eat up the real-time domain, at least for tasks which aren't best served with formal or model-based methods. It might already be usable, most of the essential pieces seem to be in place. No GC, many parts of stdlib, typed arena for memory pools etc. Move operations and immutable by default should reduce tendencies for defensive copying. But best-practices, documentation and tooling for real-time is not on par with C++ yet. Though real-time is an underdocumented art in general..
- smitherfield 9y agoFaster[1] than Java (glacial, albeit with warmer weather recently) or C (continental drift), slower than Swift, PHP (which truly has become a "kitchen sink" language equal to C++'s reputation for the same) or Python, about the same as Javascript.[2] [1] By which I mean the languages themselves and minimally-conforming standard libraries rather than ecosystems or quasi-standard libraries like J2SE (Java), Cocoa (Swift) or the browser DOM (Javascript). C++ has a fairly slow-moving (but mature) ecosystem and its "quasi-standard" libraries (Boost, common compiler extensions, Windows and POSIX APIs) aren't as tightly-coupled to the language as the previous three examples. [2] Both hindered by standards-body bureaucracy and the need to keep backwards compatibility with mistakes, but both popular enough that bigcorps are incentivized to keep things moving along; Javascript is more popular but that's offset by C++'s more efficient de facto process for standards-tracking library improvements (get them into Boost first). Javascript actually probably moves a bit faster but Internet Explorer compatibility (still likely to be relevant for another 5 years or so) is an even bigger drag on adopting bleeding-edge features than waiting for (your company adopting) new Visual Studio/CentOS GCC/[Some embedded architecture] GCC versions is for C++.
- shawncplus 9y agoSafari (specifically iOS Safari) is definitely a bigger drag on newer features than IE at the moment. IE is a known quantity and Edge has particularly good support. Safari, however, seems to be a case of Apple, ostensibly, making completely arbitrary decisions on what to include or not.