cubbimew
Re:Why should I have written ZeroMQ in C, not C++ (2012)
on Friday May 22, 2015 @10:16PM (#9591760)
The number of copy/move constructors is zero, by the way, it's not hard (well, could be one if you're using 1980s compilers)
Re:The Pragmatic C++ Programmer
on Tuesday May 12, 2015 @11:19PM (#9536535)
In my recollection, smart pointers were a fairly common C++ idiom in the early 1990s. Ref-counted shared_ptr and scoped_ptr were even proposed in 1994 for standardization, but didn't quite make it (scoped_ptr mutated into auto_ptr). There were also cow, deep-copying, intrusive, and ref-linked smart pointers. It was easy to write your own smart pointer, while GC was something alien and magic.
Re:Ask HN: How to refresh on modern features of C++?
on Tuesday December 23, 2014 @10:33PM (#8791428)
How is the reference for a library abandoned over 15 years ago even relevant? (other than when researching history)
Re:We have C++14
on Wednesday August 20, 2014 @11:25AM (#8202709)
The guide that's publicly available says "If your class needs to be copyable, prefer providing a copy method, such as CopyFrom() or Clone(), rather than a copy constructor"
I think that's insane. Or, at the very least, surprising to encounter when working with someone else's code.
Re:We have C++14
on Wednesday August 20, 2014 @09:08AM (#8202158)
> either people prefer both or prefer neither.
exceptions (specifically, exceptions from constructors) are part of what RAII is, so it's only natural that people "prefer both".
As another personal anecdote, in my experience working with a large (175MLoC at last count) mostly-C++ codebase, I can't imagine how painful it would have been if the code didn't use exceptions.
Re:Google C++ style guide
on Thursday April 10, 2014 @08:09AM (#7565406)
It doesn't get any worse than that guide (except maybe EC++ or the FQA).
No RAII, no class invariants, no value semantics, no streams, no operators (which means no custom Iterators, EqualityComparable or even CopyAssignable types! Such a basic feature called "insidious").
Not even mentioning the FUD about newer C++ features.