I don’t think that casting a range of bits as some other arbitrary type “is a bug nobody sees coming”.

C++ compilers also warn you that this is likely an issue and will fail to compile if configured to do so. But it will let you do it if you really want to.

That’s why I love C++

  • Zacryon@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    9 hours ago

    I suppose it’s a matter of experience and practise. The more you wotk with it the better you get. As usual with all things one can learn.

    • sexual_tomato@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      The question becomes, then, if I spend 5 years learning and mastering C++ versus rust, which one is going to help me produce a better product in the end?