6 ms·
Whenever I start to feel like a real programmer making games and webapps and AI-enhanced ETL pipelines, I inevitably come across the blog post of a C++ expert a
by matt123456789 1y ago
Whenever I start to feel like a real programmer making games and webapps and AI-enhanced ETL pipelines, I inevitably come across the blog post of a C++ expert and reminded that I am basically playing with legos and play-doh.
- tombert 1y agoI'm not a C++ developer at all, but unless I'm missing something this didn't seem terribly difficult? This isn't meant to make myself seem smart or to try and make you seem dumb, I'm just curious what was confusing about this even from a high-level perspective. It felt like a clever but not too atypical metaprogramming thing. Maybe I've just done too much Clojure.
- lmariscal 1y agoI would argue that C++ expertise doesn't necessarily correlate to the complexity of the software being developed. Although I do try to learn the fancy new features I know many developers who even though they are still only using C++11 features they are creating some very complex and impactful pieces of software.
- lanyard-textile 1y agoI definitely think that’s not a coincidence. C++11 is where you get the most useful feature tradeoffs with reasonable costs. Smart pointers being a great example. Shared ptr has its issues, it isn’t the most performant choice in most cases, but it by far reduces more footguns than it introduces. Compared to something like std::variant in the C++17 standard that comes with poor enough performance issues that it’s rarely ever a good fit.
- otabdeveloper4 1y agoJust because someone didn't bother to learn anything past C++11 doesn't mean C++11 is some sort of performance sweet spot.
- jandrewrogers 1y agoC++11 was for me the first version of C++ where the expressiveness justified the extra complexity relative to C. It was when I finally committed to using C++ instead of C for systems code. In the same sense, C++20 is qualitatively better than C++11 in every way and dramatically reduces the complexity of C++11 while adding many features C++11 needed.
- pjmlp 1y agoI would add C++23, but only due to std being available as modules, and at least on VC++ is kind of ok for side projects.
- tw061023 1y agoIt's the other way around. You are the real programmer and the committee and the "modern C++" crowd are more interested playing with legos instead of shipping actual software. No way anything std::meta gets into serious production; too flexible in some ways, too inflexible in others, too much unpredictability, too high impact on compilation times - just like always with newer additions to the C++ standard. It takes one look at coding standards of real-world projects to see how irrelevant this stuff is. And like always, the problem std::meta is purported to solve has been solved for years.
- d_tr 1y agoWhat's the solution that's been around for years? > ... just like always with newer additions to the C++ standard. This is objectively laughable.
- jcranmer 1y ago> What's the solution that's been around for years? Build tools to generate C++ code from some other tool. Interface description languages, for example, or something like (going back decades here) lex and yacc even.
- d_tr 1y agoGreat. But you can do anything you want by generating code. Why not have a standard solution instead of everyone doing their own, possibly buggy thing complicating their build process even more?
- tw061023 1y agoReframe it as "you can do precisely what you need by generating code" and there is your answer. Which is far better than to rely on a party which, as I said, has precisely nothing to do with what anyone needs. Which will inevitably produce solutions that can only partially (I am being generous here) be used in any particular situation. As for "possibly buggy" - look, I can whip up a solid *DL parser complete with a C++ code generator in what, a week? And then polish it from that. The committee will work for several years, settle on a barely working design, then it will take some years to land in major compilers, then it will turn out it is unusable because someone forgot a key API or it was unfeasible on VAX or something like that. And my build process is not complicated, and never will be. It can always accomodate another step. Mainly because I don't use CMake.
- rramadass 1y agoI know your comment was meant as a tongue in cheek funny one but people should not be intimidated/overawed by the size of the C++ feature set. You don't need to know nor use all of them but can pick and choose based on your needs and how you model your problem. Also much of the complexity is perceived rather than real since it takes time for one to understand and assimilate new concepts. You can program very effectively and productively using just C++98 features (along with C if needed) with no hint of "Modern C++" (never mind the fanbois :-) What this gives you is the ability to use a single language to tackle small constrained microcontrollers with very limited toolchain support all the way to using the latest and the greatest toolchain on top-of-line processors.
- einpoklum 1y agoMuch of the complexity may be perceived, but much is also real, because of the commitment to backwards compatibility and non-breakage, plus poor default behavior of many things, often due to the C legacy, sometimes due to inopportune choices in earlier versions of the standard. Just think of things like variable initialization with () and/or {} ; or various kinds of implicit casts ; the hoops you need to go through to work with variants; etc. But I agree that one doesn't have to learn everything, or nearly-everything, to write decent-to-good modern-C++ code.
- rramadass 1y agoThe problem is that many confuse C++ Language expertise (often snarkily called a "language lawyer") with C++ Programming expertise. A famous example is Scott Meyers who is squarely in the first camp and who has publicly stated as not having written any sizeable C++ programs. Given that C++ is quite a baroque language it is important for programmers to focus on the second aspect and slowly build up their knowledge of the first aspect over time (most experienced programmers tend to do this in any language).
- einpoklum 1y agoAs a person who has some of both, I'm not so sure I agree. Many developers just get into the habit of assuming they don't need any more language knowledge, since they get by already, and the codebase they use is filled with code which fails to utilize most modern language features, and _that_ is already quite a hassle to know well enough to use.
- mkoubaa 1y agoLibrary development and application development are activities of a different kind entirely.
- TinkersW 1y ago[dead]
- burnt-resistor 1y agoThat's pretty advanced. I realize now I've been finger-painting on the non-washable walls all along. I will now sit in the corner with a dunce cap and consider an execution model for each of greedy and lazy functional languages.