terminalbraid 2 days ago

Then you seem to be fine with inconsistent ownership and a behavioral dependence on the underlying data rather than the structure.

You really don't see why people would point a definition that changes underneath you out as a bad definition? They're not arguing the documentation is wrong.

  • assbuttbuttass 2 days ago

    The definition is perfectly consistent. append is in-place if there's enough capacity (and the programmer can check this directly with cap() if they want), and otherwise it allocates a new backing array.

    • terminalbraid 2 days ago

      Yes, it's consistent and complicated and non-intuitive.

      "Consistent" is necessary but not sufficient for "good".