5 comments

  • Panzerschrek6 minutes ago
    &gt; exceptions are slow<p>There are proposals to introduce better exceptions into C++. Like this: <a href="https:&#x2F;&#x2F;www.open-std.org&#x2F;jtc1&#x2F;sc22&#x2F;wg21&#x2F;docs&#x2F;papers&#x2F;2018&#x2F;p0709r0.pdf" rel="nofollow">https:&#x2F;&#x2F;www.open-std.org&#x2F;jtc1&#x2F;sc22&#x2F;wg21&#x2F;docs&#x2F;papers&#x2F;2018&#x2F;p07...</a>.<p>But until it&#x27;s not in the standard, people should use std::expceted instead.
  • mike_hock32 minutes ago
    &gt; Virtual vs static polymorphism<p>&gt; std::visit over std::variant&lt;A, B, C&gt; is lowered to a switch over the active alternative.<p>&gt; In this case, layout is probably doing more work than the dispatch mechanism itself.<p>Very likely because last time I checked visit lowers to a virtual call.
  • Glandalf47 minutes ago
    I’ve seen some terrible horrid nonsense from them and even the best compilers don’t use a third of the opcodes our modern CPUs boast of. Nobody understands the big compilers any more either, they’re all too huge. And soon AI will be “improving” hem too.<p>You want to see a beautiful compiler? Look at Plan 9’s compiler suite. A man could understand and even build on that.
  • kzrdude53 minutes ago
    Trust the compiler - sure - but we can&#x27;t change the whole program by using -ffast-math, unfortunately, so that particular one is out.
    • CoastalCoder21 minutes ago
      I really dislike the complexity of modern C++ language specs, but does it obscure much detail about FP ops?<p>TL;DR:<p>A vast majority of the programmers I&#x27;ve worked with don&#x27;t understand the nuances of FP <i>in general</i>, nor the various extents of IEEE-754 support in different programming languages.<p>So for <i>important</i> numerical programming, I think clarity regarding the FP operations being performed can be crucial. I&#x27;m just unclear if modern C++ is a significant factor for that.
  • sylware1 hour ago
    Are you a fool?<p>Another name for compilers: invisible backdoor injectors. The more complex is the syntax the more it is likely to happen... I let you guess how the &quot;sane&quot; syntax from c++ and similar (LOL) does fit here...
    • pjmlp21 minutes ago
      Quite funny comment on the vibe coding age.