Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022

252,290
0
Publicado 2022-11-12
cppcon.org/
github.com/CppCon/CppCon2022
---

Can C++ be 10x Simpler & Safer? (Simplifying C++ #9 of N) - Herb Sutter - CppCon 2022

Since CppCon 2015, all of Herb’s talks have been about ways to evolve C++ to make it simpler, safer, and more toolable. Every release of ISO C++ has already been making regular incremental “10%” improvements in these areas. But what are the fundamental factors that limit our rate of improvement, and what would it take to make greater progress? Like every year, Herb’s talk will explore selected current pain points and describe experimental ideas to address them that might someday contribute toward C++’s long-term evolution.
---

Herb Sutter

Herb is an author, designer of several Standard C++ features, and chair of the ISO C++ committee and the Standard C++ Foundation. His current interest is simplifying C++.
---

Videos Filmed & Edited by Bash Films: www.BashFilms.com/
YouTube Channel Managed by Digital Medium Ltd events.digital-medium.co.uk/

#cppcon #programming #coding

Todos los comentarios (21)
  • @luctielen
    Matt Godbolt is such a legend, adding support for cpp2 to compiler explorer during the talk.
  • I have literally dreamed of this exact idea. I'm so amped at the prospect of this becoming real. 🤞 Herb Sutter, as always, proves that he deserves our respect.
  • @SqueakyNeb
    Finally, after YEARS of warmup, Herb Sutter finally says it: if C++ is so good, why isn't there a C++ 2?
  • @Razzileful
    This is not just a fascinating idea/experiment, but may even fall into the "essential for continued language evolution" category! I really hope it succeeds
  • @magikworx3748
    This is the first "alternative" I've wanted to learn. Thank you for the dream of a better, way less complicated future.
  • @kodirovsshik
    Ever since I saw that one talk by Herb on an actual good way of passing arguments, that talk never left me as I thought about it again and again, and now I can't describe how happy I am to see Herb still keep actively pushing C++ towards this direction of simplifying it. I even shed a tear at some point watching the talk and I believe it means a lot to the whole C++ community as it does to me, so I just wanna say thank you a million to Herb for doing this fascinating job of actively and sincerely trying to make our world better
  • @zactron1997
    This is exactly what we need in the world. I started learning Rust because of the amount of work I'd need to do to go from "my code compiles" through to "and now it's not a pending lawsuit". Rust is not for everyone, so I'm really happy to see C++ moving towards a world where it catches up to (and hopefully exceeds!) Rust's ergonomics and safety.
  • @ryanwooley4111
    Very nicely done, Herb! This approach not only bypasses the backwards-compatible limitations baked into C++ while still allowing mixing code, but keeps the language feeling like a refreshed C++ instead of something completely new. I think this compromise will be a appealing to many C++ developers. I think Rust is an excellent alternative to C++ (and is available today) but comes at the cost of learning a different way of thinking about memory safety and interoperability headaches with C++. Carbon is another experimental language trying to overcome these issues with a new language that prioritizes compatibility but is not familiar to those coming from C++. I suspect cppfront will be an easier sell to those currently heavily-invested in C++ but want more simplicity and safety guarantees.
  • @mattbettcher
    This really is quite good! I've been waiting years for someone to reduce complexity in C++!
  • @ElPikacupacabra
    I'm not convinced a systems level language should force smart pointers or particular trendy abstractions. For example, pointer manipulation is essential. There's too much handwaving in the answer to that question that was asked at the end. Maybe this is the direction of evolution of C++, but then it won't be C++ anymore. For me, C++ is the language I go to for maximum computing efficiency. This seems to be an example of the age-old tension in language design: Some people want a safe, productive language that is nice to use, but many want a useful language that can get out of their way when they program at a low level. Personally, I think that the safety features should be left to tools, and the language should be kept as simple and as unlimited/expressive as possible.
  • @TimTeatro
    Onece I'm finished my thesis, I'm going to start working on LSP and treesitter for this (with Neovim support in mind). If this reaches escape velocity, it's going to be huge. A transpiler isn't as exciting as something like Carbon, but I think this is the right increment to move forward.
  • @tomekczajka
    It's a different programming language that interoperates well with C++. Herb keeps saying "it is C++" but I don't know what that means.
  • I love rust grammar. Don't get me wrong. However instead of transpiling, why we can't simply deprecate all those dangerous sharp edges (malloc, allocating new, union, unboundchecked accesses) that now c++ already has safer alternatives then just remove or internalise/classical-mode them. If the actual problem is today people still keep using them as before. Why won't c++ just stop them from using those?
  • @zenteapot
    This is literally like a dream come true. More than once I've written fake cpp code in an empty editor just to imagine what a unified function syntax would be like, what a unified paramter passing paradigm would be like without all the const ref crap. There is an echo in my soul that this just makes so much sense, and I beleive it is a common feeling among many cpp coders. Yet cpp toolchain always felt like a behemonth that's too big and too complicated for a lone developer to tackle on. So a great many lone developers are left to just imagine what's possible. It really need someone like Sutter to push this venture. Please make this happen. Sutter is like jesus reborn for cpp.
  • @Swampdragon102
    I've been avoiding C++ in projects because of all the complexity and the chances to fail miserably. But this looks pretty good! I have one important question though: Why not `const` as the default for everything everywhere? I am a firm believer in "the laziest solution should be the best", so adding sth like an explicit `mut` instead of `const` would fit that paradigm.
  • imho, C++20 syntax is near-perfect. Just deprecate the ridiculous standard library and build a new one from scratch. Learning from libraries in newer languages might be a good idea.
  • @acf2802
    Personally hate the use of underscore as a type placeholder. Would much prefer a keywork like auto or even var. Also dislike much of the departure from C syntax for control flow statements. Obviously C can be improved but everyone already knows and understands C so every difference is just one more thing someone has to learn, so why not minimize that rather than indulging yourself with your personal preferences.
  • @jhk578
    I love the syntax of cpp2. And loving the all the features of herb trying to make, light weight exception, static reflection, metaclass, gc support. It will kill C++ dialects like UE C++ and QT C++ which is amazing. But something I miss is that some kind of ambition that make people thrills. I really wish that circle, carbon, val and cpp2 get marry somehow. We need better mechanics for meta programming. We need better approach that make evolution process faster. We need compile-time memory safety built-in to the language. We, C++ programmers need some features that make us claim proudly that we are at front of PL rather than C++ won't die because of backward compatibility.
  • @AP-dc1ks
    Imho when I read the "name: type = value" syntax I want to check if it's April fools. At least do it the other way around, "type: name = value". And when we're at it, if the colon is always there just leave it out.