News for hackers. Stuff that matters.
Re:Rule of Zero (C++) by br1 on Friday November 23, 2012 @11:33AM (#4822714)
I agree on (1). Typedef obscures more than it helps.

On (2), I think the solution is intrusiveness. intrusive data structures and intrusive_ptr should be used more in C++.

The dislike for intrusiveness is rooted on equating classes with responsibilities. A single responsibility is often spread over several classes, because the classes form a useful cluster. A clear case is items of a collection. If an object already knows it's an item in a collection, there's really no harm in using intrusive lists.

Re:Rule of Zero (C++) by pcwalton on Friday November 23, 2012 @12:58PM (#4823044)
Intrusiveness also isn't so good when you want the class logic to be independent of the memory management scheme in use. We experimented with language support for intrusive data structures in Rust (`@class` for an intrusive `shared_ptr`) and it turned out to be a lot of trouble, so we removed it.
Re:Rule of Zero (C++) by eps on Friday November 23, 2012 @04:57PM (#4823802)
Typedef should really be creating a new type, and not an alias. It's one of few thing I wish C(++) had different.