Hacker News new | ask | show | jobs
by dbaupp 4244 days ago
> Modern C++ favors RC.

Does it? I was under the impression that the order of preference (from most preferred to least) is something like:

  - plain values (i.e. no pointers)
  - references
  - unique_ptr
  - shared_ptr
  - raw pointers
1 comments

Raw pointers is the last item on your list after RC pointers.
From this response, I guess that maybe you were meaning C++ favours RC compared to manual memory management, and were not saying that it is the globally preferred option, but this differs to everything else in your list: the others are the main/preferred strategy in those languages/libraries.
> I guess that maybe you were meaning C++ favours RC compared to manual memory management,

Yes.

> the others are the main/preferred strategy in those languages/libraries.

While true, manual memory management is still possible, but should be left for the 1% cases that really benefit from it.