4 ms·
I'll keep saying it: give me a modern language that is cross platform, results in reasonably sized code footprints, is fast, and that can be used to ship code o
by api 12y ago
I'll keep saying it: give me a modern language that is cross platform, results in reasonably sized code footprints, is fast, and that can be used to ship code on all the major OSes, and I'll switch. Until then C/C++ is the only way to achieve that.
It's analogous to the situation with JavaScript on the web. JavaScript is the language of the web because JavaScript is the language of the web. C/C++ is the language of systems because C/C++ is the language of systems.
- evincarofautumn 12y agoRust is getting there. In addition, I and I’m sure many others are working on languages with these goals.
- Scramblejams 12y agoBesides the aforementioned Rust, I think Nim's got a lot of potential here. And although I'm not a fan, does Go not fit the bill for you? Of the three languages I mentioned, it's the only one that everyone agrees is production ready.
- plq 12y agoNim's got a long way to go with its thread-local non-shareable heap if it's aiming to replace C++. (I don't think it actually does.)
- Scramblejams 12y agoTrue, true, but he hadn't explicitly put that in his wishlist, so... :-)
- jayvanguard 12y agoDon't mix the two together. C is great for systems and some application programming, C++ is rubbish. There was one brief stretch in history around 1994-1998 where C++ was the best choice for application level programming. And even then only a very narrow type of app programming. Before that brief timeframe and since then it has been a poor choice for every single type of programming. There are better choices in all cases. It has no niche anymore where it is the best fit, not anywhere.
- pjmlp 12y agoC++ lets me write safe code, C on the other hand....
- jayvanguard 12y agoWhat OS are you running this on?
- pjmlp 12y agoOn Windows, where C is considered legacy and C++ is allowed on the kernel.
- CountSessine 12y agoDoes it matter? std::string is safer than the dog's breakfast that is strcpy/strncpy/lstrncpy/strncpy_s/mempcpy on any platform. And static_cast<myclass> beats (void*) everywhere - Linux, Windows, OSX, Android...
- CountSessine 12y agoBefore that brief timeframe and since then it has been a poor choice for every single type of programming. There are better choices in all cases. For memory-sensitive applications where time-amortization hurts (and this turns out to be pretty much every application that anyone wants to run on their local computer), C++ is still king and is still the best choice for the job. Everyone hates C++, and yet every desktop application in widespread use is built with it. I wonder why? Is it really just inertia? Java, C# - programmers are stuck with a runtime that literally consumes 10x ram as equivalent C++ software. Do you like switching applications on your Android phone and having every other process pushed out of memory? I didn't think so. And while both environments are now offering ahead-of-time compilation, the CLR/JVM runtimes are still much larger than what C++ consumes and you give up the only chance of matching C++'s runtime CPU performance (harvesting runtime profiling to inform the JIT). Golang - a huge step in the right direction, this will probably end C++ use on servers and hosts eventually. It still can't match C++'s runtime performance, but who cares in a host environment. Still, garbage collection makes it unsuitable for local applications where users notice micro-pauses due to garbage collection. Nothing is worse than going into alpha with 10 P0 bugs complaining about 'micro-pauses' and finding out it's because of something you can't change in the runtime. D - truly a better C++ than C++. But no one uses it. Rust - our best hope so far, but the compiler and standard library aren't there yet. You still can't program a web server, for example, without manually handling unsafe objects. Even then its going to be years before there are libraries available that are of similar quality to things like Qt. How do make a GUI application in Rust in 2015? C - I hope you like (void*) and all of the fun runtime bugs that introduces. But seriously - "There are better choices in all cases"? Like what?