Re:Linked lists in C, with open source ADT
by marshray on Saturday January 19, 2013 @11:20PM
(#5085992)
If you don't mind me asking ... what religion are you that considers copyable types to be the devil?
[ Parent
| on HN ]
Re:Linked lists in C, with open source ADT
by shrughes on Sunday January 20, 2013 @12:55AM
(#5086149)
Presbyterian. Well no, but see http://google-styleguide.googlecode.com/svn/trunk/cppguide.x... for some rationale in that direction. Generally speaking you might note that in Java and C#, if you want to copy a data structure, you have to do so explicitly.
Re:Linked lists in C, with open source ADT
by marshray on Sunday January 20, 2013 @01:08AM
(#5086179)
Yeah I agree that one should intentionally enable or disable copy and assignment for a type. It might even make sense to disable implicit copying and make an explicit method for it instead.
The C++11 move constructor and move assignment operator seem to me to be a wonderful middle ground.