News for hackers. Stuff that matters.
Re:Chromium project finds that 70% of security defects are m... by Too on Sunday May 24, 2020 @12:33PM (#23292630)
Sure, you can shared_ptr everything and pretend your are writing C#, which as you say circles back into the same problems of spaghetti-ownership. The difference with c++ or rust is that you have options: plain &-reference for non persistent pointers, const &-references for read only non persistent pointers, copy for true copies, move/unique_ptr for transfer of ownership and shared_ptr for shared ownership. All this information is readily accessible to the caller through the function signature.

There are no comments on this comment yet.