News for hackers. Stuff that matters.
Re:C++ Core Guidelines by enqk on Friday September 18, 2015 @03:04PM (#10241365)
The more I develop in C++, the more I wish I had a very restructure transpirer that would remove some of its most silly constructs or switch ite base defaults around.

Some examples: - making all constructors explicit and adding an implicit keyword instead for that rare case - automatically generated !=, <=, >= etc from == and < (with an explicit override when you want to be silly) - removing some of the redundant syntaxes (const positioning, typedefs vs using etc - removing the class keyword

Re:C++ Core Guidelines by Rexxar on Friday September 18, 2015 @07:00PM (#10242510)
You can use "boost/operators.hpp" for operators generation.
Re:C++ Core Guidelines by tragomaskhalos on Friday September 18, 2015 @06:27PM (#10242409)
You can easily do your != et al from < thing by using CRTP inheriting from a 'comparable' template class that provides the implementations. Sort of thing that should be in std really.
Re:C++ Core Guidelines by ourson on Friday September 18, 2015 @06:51PM (#10242484)
It is. using namespace std::rel_ops;
Re:C++ Core Guidelines by ant6n on Friday September 18, 2015 @09:56PM (#10243006)
It looks like this isn't attached to the class definition, but rather to the uses. I.e. for every use of a class that only defines ==, <, you have to include rel_ops. But then it would basically provide the other comparators to all classes, maybe not something you'd want.
Re:C++ Core Guidelines by unfamiliar on Tuesday September 22, 2015 @10:08AM (#10258638)
I would make const the default and require a `mut` keyword.