4 ms·
c++. Its not going away.
by gonzo41 11y ago
c++. Its not going away.
- moonshinefe 11y agoThe level of verbosity in modern C++ is almost approaching Java levels these days. I could see a simpler language gain favour.
- gonzo41 11y agoThe trick is to not use all the features.
- gilgoomesh 11y agoIt's actually the lack of features that's the problem for verbosity in C++. Features like algebraic types, pattern matching, Unicode handling – which are all part of modern languages – require bloated libraries and templating upon templating to work in C++. C++'s apparent excess of features is mostly due to the fact that its memory model and type system have hundreds of edge cases that need handling. Compared to D, Rust and other newer languages, C++ never actually feels full featured (despite being horribly complex in some areas).
- creshal 11y agoThe beauty of C++ is that you can define an arbitrarily small subset of the standard that work as simpler language of its own! Too bad not two projects can agree which subset.
- DanWaterworth 11y agoSounds like someone needs to rigorously define a good subset then write a tool to verify that a program uses only that subset.
- lucozade 11y agoAs if by magic.... https://isocpp.org/blog/2015/09/bjarne-stroustrup-announces-cpp-core-guidelines https://isocpp.org/blog/2015/09/bjarne-stroustrup-announces-...
- bryanlarsen 11y agoWow, that's huge. It's what everybody's doing anyway, but being standardized with big names and heavy hitters behind it makes it much easier to advocate and argue for. Such an effort would be so much easier to advocate for in a C++ shop, and more importantly, very difficult to argue against. This deserves a proper HN discussion. I've resubmitted it, it missed the front page the first time around: https://news.ycombinator.com/item?id=10545921 https://news.ycombinator.com/item?id=10545921 (sorry for the karma stealing, lucozade totally deserves the karma if my resubmission takes off)
- creshal 11y agoI suspect it'll end like this: http://xkcd.com/927/ http://xkcd.com/927/
- richev 11y agoIsn't the verbosity all about job security? ;) http://harmful.cat-v.org/software/c++/I_did_it_for_you_all http://harmful.cat-v.org/software/c++/I_did_it_for_you_all
- otabdeveloper1 11y agoThis hasn't been true since C++11. C++11 is as terse as ML.
- deleted 11y ago[deleted]
- pjmlp 11y agoYou got it wrong. Before J2EE was a thing, there were something called CORBA and COM and mainly used from C++.
- grabcocque 11y agoC and C++ have both passed the threshold of immortality. There's so many billions of lines of code in both those languages that the likelihood of either of them ever disappearing is very slim. The question is about new development, and to what extent C and C++ are evolutionary dead ends. Nobody would design a language like C today, would they? They'd be laughed at.
- EliRivers 11y agoThey'd only be laughed at because they were accidentally recreating C and it'd be easier to just use C. C itself is a great language doing the job it was made for very well.
- grabcocque 11y agoAgain, the evidence of this is rather slim. It's basically impossible to create safe, code in C as evidenced by the fact that nobody has every managed it. You're making the mistake of assuming that because you know something really well, that makes it good.
- sien 11y agoNASA got 3.8 million lines of safety critical code written in C for the Mars Curiosity rover by 40 engineers in 5 years. It can be done. The talk on their coding standards, automatic code checking, code review and code coverage is well worth watching and listening to. http://cacm.acm.org/magazines/2014/2/171689-mars-code/abstract http://cacm.acm.org/magazines/2014/2/171689-mars-code/abstra...
- Kristine1975 11y agoBut C wasn't made for safe code, it was made as a replacement for assembly language to implement Unix in. And that it arguably did well ;-) Incidentally, according to Wikipedia, development of C started in 1972, the same year buffer overflows as a concept were first documented.
- EliRivers 11y ago
- progman 11y agoC++ has reached the state of Cobol. It's not going away just for historical reasons. There is too much code written in it which needs to be maintained in the next decades. I don't envy them who are forced to do that :-)