5 ms·
Most of the problems mentioned there don't apply to the regular C++ coder in his daily life, many of the mentioned problems are even non-existant if you stick t
by NewSoftzzz 16y ago
Most of the problems mentioned there don't apply to the regular C++ coder in his daily life, many of the mentioned problems are even non-existant if you stick to the encouraged coding styles of modern and real OOP C++.
In practice just the template error messages suck as hell. I'd really like something nicer there, but in practice you actually survive those messages without too much wasting of time. You just ignore the error message and rather look at the line of code mentioned and then you usually find the problem rather fast by just looking at the line.
rgds, René
- shin_lao 16y agoIt's a compiler problem and clang is an attempt at solving it.
- colinb 16y ago"encouraged coding styles of modern and real OOP C++" Where do I go to learn those given that I work in an all C shop? One of the problems of learning C++ is the sheer profusion of material that's available, much of it written when the technology looked a lot shinier than it does now. Would you care to recommend some books or articles on C++ style that have stood the test of more than one fashion-epoch? I'm especially worried about the [to my eyes] rather large number of keywords in C++ and the many exciting ways in which they can interact. I think this is where advice about useful patterns [sorry] might be most useful. thanks c
- alexk7 16y agoThe book "C++ Coding Standards" by Herb Sutter and Andrei Alexandrescu is an excellent way to get up to date with modern yet pragmatic C++ style. I also recommend the "Effective C++" series by Scott Meyers and the "Exceptional C++" series by Herb Sutter.
- NewSoftzzz 16y agoI really do recommend the C++ FAQ book. There is a lite version online: http://www.parashift.com/c++-faq-lite/ http://www.parashift.com/c++-faq-lite/ Since I've read both the lite online version and the book I strongly encourage you to obtain the book version! rgds, René
- nuxi 16y agoIn addition I'd recommend the C++ FQA lite (http://yosefk.com/c++fqa/ http://yosefk.com/c++fqa/) which dissects the FAQ and provides additional, a lot of times quite useful, information.
- NewSoftzzz 16y agoThe C++ FQA is quite the same stuff as the .pdf linked in this topic. So the same stuff about mostly not being practically relevant applies here. rgds, René
- jerf 16y agoAre you talking about learning OO to apply in C? Learning modern C++ OO won't help much. A little, but not much. A quick google on "object oriented c" produced a boatload of good-looking sources. Remember, object orientation is an attribute of a program, not a programming language. A given language may encourage or even force a certain paradigm, but it's still a property of the resulting program. An "object oriented" language is simply a language in which it is difficult or impossible to produce a program that does not have that property. Object-oriented programming in C is perfectly possible, and often quite desirable. It isn't quite as slick but it's not terribly hard. (That said, NewSoftzzz's suggestion of the C++ FAQ Lite is still a good one. I think it's just plain required reading, personally. Even if you don't program in C++, it will step you through a lot of scenarios in one very popular OO paradigm and simply by understanding one paradigm perfectly, it is easier to understand and use the next. If this seems contradictory to my first paragraph, blame English. This is theoretically helpful, learning C++ won't practically help you much in C.)
- colinb 16y agoNo. I've spent far more of my working life puzzling through OO in C to want to inflict it on others. But I've also become a fair to middling C programmer, and the strength I bring to that task has a much to do with knowing how to build large systems in a comprehensible way from the elements the language exposes, as it does to a basic knowledge of those elements. I.e. knowing how to code a case statement isn't the same as building a 50x400 state machine that's efficient, robust and debuggable. I suspect the same is true of the skills and knowledge held by an experienced C++ hacker. So I suspect that the C++ FAQ, and the Sutter book are just the ticket. thanks c
- elmindreda 16y agoThere's no substitute for reading good C++ code, especially larger projects that still manage to be usable, maintainable and somewhat consistent. For example, the code of LLVM, Ogre, Box2D, bullet and the Second Life viewer, even though they're not always perfect, have all taught me useful things and all look far better than any of the large commercial C++ code bases I cut my teeth on.