Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Bernie (codewiz@mstdn.io)'s status on Sunday, 22-Oct-2023 18:22:27 UTC Bernie Bernie

    Bjarne Stroustrup on delivering safe C++:

    "First of all, we have to get people who are not up-to-date on C++ become up-to-date".

    https://www.youtube.com/watch?v=I8UvQKvOSSw&list=PLHTh1InhhwT7gQEuYznhhvAYTel0qzl72&index=1
    #programming #cpp #cppcon2023

    In conversation Sunday, 22-Oct-2023 18:22:27 UTC from mstdn.io permalink

    Attachments


    1. https://media.mstdn.io/mstdn-media/media_attachments/files/111/280/043/415/819/323/original/352cdf3a7ed43566.png
    • Bernie (codewiz@mstdn.io)'s status on Sunday, 22-Oct-2023 19:09:55 UTC Bernie Bernie
      in reply to
      • Johann Uhrmann

      @uhrmann Sure, anyone who is starting a new project today would be better served by #Rust than C++23.

      But Stroustrup is addressing the context of a large existing codebase. He claims that considerable gains are possible by simply adopting modern C++ and enforcing "safety profiles" with static analyzers.

      To which, I don't disagree: I see horrifying C++ code every day at work, and more being added to the pile.

      In conversation Sunday, 22-Oct-2023 19:09:55 UTC permalink
    • Johann Uhrmann (uhrmann@bildung.social)'s status on Sunday, 22-Oct-2023 19:09:56 UTC Johann Uhrmann Johann Uhrmann
      in reply to

      @codewiz my gut feeling is that it's easier for "people who are not up-to-date on C++" to learn a new, inherently safe language than to "become up-to-date" on C++.

      In conversation Sunday, 22-Oct-2023 19:09:56 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Sunday, 22-Oct-2023 19:13:46 UTC Bernie Bernie
      in reply to
      • Nuncio Bitis ✷ ✅

      @nuncio That's in the eye of the beholder: I find modern C++ much more readable than old-school C/C++ with void* and casts everywhere.

      And by "readable", I actually mean: being able to verify that it works correctly, without leaking resources, stepping off the bounds of arrays, using uninitialized objects, etc.

      In conversation Sunday, 22-Oct-2023 19:13:46 UTC permalink
    • Nuncio Bitis ✷ ✅ (nuncio@mstdn.social)'s status on Sunday, 22-Oct-2023 19:13:47 UTC Nuncio Bitis ✷ ✅ Nuncio Bitis ✷ ✅
      in reply to

      @codewiz In other words: "We need to obfuscate all our previous code to be able to keep our jobs"

      In conversation Sunday, 22-Oct-2023 19:13:47 UTC permalink
    • Nuncio Bitis ✷ ✅ (nuncio@mstdn.social)'s status on Monday, 23-Oct-2023 00:44:33 UTC Nuncio Bitis ✷ ✅ Nuncio Bitis ✷ ✅
      in reply to

      @codewiz Wait until you have to maintain someone else's code that has no type specifications and classes that inherit off each other in circular fashion.

      In conversation Monday, 23-Oct-2023 00:44:33 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Monday, 23-Oct-2023 00:44:33 UTC Bernie Bernie
      in reply to
      • Nuncio Bitis ✷ ✅

      @nuncio That's *always* the case when you work on a large codebase: no human can write one million lines of code on their own, and established projects such as Chrome, Firefox, Android, Linux and GCC are multiple millions of lines written by thousands of people over decades.

      In conversation Monday, 23-Oct-2023 00:44:33 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Monday, 23-Oct-2023 00:48:23 UTC Bernie Bernie
      in reply to
      • Nuncio Bitis ✷ ✅

      A few months ago, I tried fixing a bug in one of GCC's optimization passes.

      GCC was originally written in C and is now compiled in C++ mode, but mostly remains a C-style codebase.

      I understand the bug and I have some idea of what should be done to fix it, but all my attempts failed with crashes or ICEs 😞

      @nuncio

      In conversation Monday, 23-Oct-2023 00:48:23 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Monday, 23-Oct-2023 00:58:54 UTC Bernie Bernie
      in reply to
      • Nuncio Bitis ✷ ✅

      With GCC's old-school coding style, it's very easy to call a function with the wrong type of node. My code compiles just fine, but crashes at runtime with my testcase.

      I haven't tried, but my change would likely pass the entire GCC testsuite with thousands of tests.

      Morale: to speed up software development and eliminate entire classes of bugs, we need abstractions that can be verified at compile-time. Modern C++ incorporates some of these ideas, and Rust is built entirely around them.

      @nuncio

      In conversation Monday, 23-Oct-2023 00:58:54 UTC permalink
    • Bernie (codewiz@mstdn.io)'s status on Monday, 23-Oct-2023 01:05:08 UTC Bernie Bernie
      in reply to
      • veer66

      @veer66 How about Cpp2? 😏

      https://www.youtube.com/watch?v=8U3hl8XMm8c&list=PLHTh1InhhwT7gQEuYznhhvAYTel0qzl72&index=4

      Herb Sutter is the chair of the ISO C++ committee, and author of a few books on C++ which I read long ago...

      ...and he wants to redesign C++ around safety and simplicity. Yes. Unlike previous failed attempts, he actually seems to know how to make this succeed.

      In conversation Monday, 23-Oct-2023 01:05:08 UTC permalink
    • veer66 (veer66@social.vivaldi.net)'s status on Monday, 23-Oct-2023 01:05:09 UTC veer66 veer66
      in reply to

      @codewiz Why not give a new name to the new language, such as C+++, instead of bumping the version?

      In conversation Monday, 23-Oct-2023 01:05:09 UTC permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.