• affiliate@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    3 days ago

    i will never forgive them for making the pointer type be T* instead of &T. most confusing thing ever.

    don’t even get me started on C++ making T& the reference type and then making T&& be something other than the double reference type.

    • xthexder
      link
      fedilink
      arrow-up
      5
      ·
      3 days ago

      I always thought T&& made sense as a movable reference. In order to move something, you need to change where the reference points, so conceptually you need a reference to the original reference to update it. (Effectively a double reference)