5 ms·
I really love C++ and I bet with the currently developing standard (C++11, C++14) more people will start loving C++ again :-)
by kirab 13y ago
I really love C++ and I bet with the currently developing standard (C++11, C++14) more people will start loving C++ again :-)
- trimbo 13y agoI've been away from it for a few years and just recently picked up a new project in C++11. I'm loving the improvements.
- chrismorgan 13y agoHave you tried Rust? It's not an entirely stable language yet, but I've been absolutely loving it thus far in my few months of close involvement. C++11 and C++14 are vast improvements, but I reckon Rust is still considerably better than them. As far as Rust for the web is concerned, I've got pretty big ideas which Rust is instrumental in (I've been primarily a Python programmer hitherto, FYI), and so I'm working on the lowest layer at present, in rust-http (https://githib.com/chris-morgan/rust-http https://githib.com/chris-morgan/rust-http). By the time it's entirely ready for production use, I expect someone to have got Rust working with Emscripten too, and then we'll be ready to do even better than Duetto.
- betterunix 13y ago"I bet with the currently developing standard (C++11, C++14) more people will start loving C++ again" I doubt it. C++11 takes C++ even further from where it needs to be. Every high-level feature is bogged down by low-level annoyances. Do you capture variables by value or by reference? Do you need a weak pointer to break this cycle, or can you use a weak pointer somewhere else (or maybe just not both with smart pointers at all?)? Your destructor has an error to report -- now what? The reason nobody likes C++ is that it is overly complicated for low-level programming and too low-level and annoying for high-level programming. At best the only thing people can say about C++ is that it is "good enough" and popular.
- dman 13y agoI like C++ because it addresses problems relevant for building performant applications in the real world. Details matter for performance - the memory hierarchy, cost of small allocations, allocating and accessing aligned data, copying to enable concurrency are all real things.
- betterunix 13y agoDetails may matter for performance (though in my experience people tend to gravitate towards such things while ignoring asymptotic improvements that can be far more dramatic), but C++ is annoying even if that is something you are trying to do. C++ has a tendency to insert "surprises" into compiled code -- lots of implicit function calls, copies, etc. I saw this sort of thing first-hand when I TA'd a data structures course taught in C++, when a student came to me asking for help with some very bizarre behavior: a member function was being called for an object that had never been allocated. The problem was that the student had forgotten to write a return statement (why is that even allowed? compilers can obvious detect this, since using -Wall picked it up), and a virtual destructor call had been inserted, but the vtbl for some other object was sitting there and so some other member function for an unrelated class was called. So while you are sitting there trying to figure out if your class members are aligned optimally, your C++ compiler is inserting function calls and not letting you know about it. If it were just a few implicit calls or copies, it would not be a big deal, but C++ is a huge, complicated language with lots of such things. Basically, almost everything you mentioned is a low-level concern for which high-level constructs are just a distraction. The point of high-level programming is to direct programmer effort away from such things (hence the implicit function calls and copies, etc.). If you want to program at a low level, fine -- but my point was that in C++, low-level and high-level programming are too tightly coupled. Finally, it is worth pointing out that this: "copying to enable concurrency are all real things." Is not something C++ has any kind of advantage in. I do it in Lisp all the time. You see it in functional programming languages all the time.
- dman 13y agoThe C++ philosophy is to only pay for costs of things that you actually use. Making every check in -Wall an error by default would make every one pay the costs of those extra checks at compile time.
- vinkelhake 13y agoPray tell us, where does C++ need to be? All C++ programmers who I have talked to welcome most things in C++11. It simplifies their C++-code in many ways. As an example: specifying how to capture variables was something they were already dealing with when writing functors manually, now they have a shorthand syntax for it. As for the reason why non-C++ programmers don't like C++, perhaps you are in a better position to say.
- protomyth 13y agoIs there a book that teaches best practice C++11 without teaching any of the old cruft?
- angersock 13y agoOnly the good parts: http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628 http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/...
- protomyth 13y agoWhat an amazingly unhelpful, snarky, useless comment. If you don't like the question or I guess the topic, just skip it.
- angersock 13y agoYou're more likely to find up-to-date and useful resources on the 'net then in a dead-tree form. Moreover, you aren't likely to be able to write any meaningful code without cruft, because you'll have to use existing libraries, where that cruft lives. Giving you a reference to writing C properly--something most folks still don't do--is actually somewhat helpful as opposed to pure snark. Does C++ have a fixed ABI yet? Is there a fixed name-mangling scheme across compilers? How do I bind other languages to the lambdas?
- protomyth 13y ago
- xixi77 13y agoDoes this thing even support C++11? I see no mention of it on the home page...
- apignotti 13y agoIt fully supports C++11, part of the machinery for client/server seamless programming is based on C++11 capabilities - Alessandro of Leaningtech
- darkstalker 13y agoD has all the features C++ should have, and implemented in a sane way.