39 karma · joined September 19, 2014
Experimental means that it's part of Technical Specification - basically the proving ground before being accepted into the C++ standard. It is truly cutting edge stuff, so should only be used where there would not be drastic consequences if it were to suddenly change or disappear.
Is CC0 appropriate for code? I was thinking of going with MIT, but that would require retaining the license in any derivative works. Anybody have thoughts on this matter?
I wanted to provide a place for beginners to learn about modern features of C++ and a quick reference for idioms and best practices. As the disclaimer says, the existing samples all need review, so don't take anything as gospel. If you would like to contribute please check the samples GitHub repo [0] or leave comments on the sample pages themselves.
A few good points that keep coming up:
- The Rule of Three sample especially needs a rework (it will become the Rule of Five later today).
- It isn't supposed to demonstrate the best C++ formatting style, simply because that would come down to personal preference.
- I have opted to not use `auto` unless necessary for the sake of being explicit about types so that beginners have something to reference against. This is important regardless of ones particular preference for when `auto` should be used and it would be impossible to please everybody. I will be adding a note to the site soon.
- I plan to add a "requirements" section to the sample information which will state which version of C++ the sample depends on.
- The value computations of operators, like 5 + 6. These don't use the values of objects. They just use the values of their operands. The operands may be subexpressions that denote objects (like 5 + x), but it is the value computation of those subexpressions that uses the object's value, not the value computation of the operator.
- The value computations of expressions denoting objects where the expression is being used as an lvalue. These also don't use the values of objects - they only care about the object's storage location. I give an example in the article, which is the left operand of =.
- The value computation of expressions denoting objects where the expression is being used as an rvalue. This means lvalue-to-rvalue conversion is performed, which is conceptually "reading an object's value out of memory". This, therefore, uses the value of the object.