justinmeiners / efficient-programming-with-components

Course notes for Alexander Stepanov's teachings on design and usage of C++ STL.
https://www.jmeiners.com/efficient-programming-with-components/
75 stars 6 forks source link

add a note about NaN values in chapter 3 #9

Closed aharrison24 closed 3 years ago

aharrison24 commented 3 years ago

Solving this conundrum is left as an exercise for the reader, but you either know it or you don't. Those who don't know it are likely to be left frustrated and denied the opportunity to think through what the implications are. On balance it seemed like an explanatory footnote was worthwhile.

I know this is a bit controversial. I won't be at all sad if you reject the PR!

justinmeiners commented 3 years ago

If he did not return to this topic, I would agree with you. But, later on they do cover this in detail here:

https://justinmeiners.github.io/efficient-programming-with-components/06_min_max.html#Fundamental-logical-laws-are-not-always-obeyed

There are several places where he proposes an exercise and then solves it in the next section. Do you think it would be helpful to include a parenthetical or footnote telling the reader where it will be answered?

aharrison24 commented 3 years ago

Sorry, I hadn't got that far yet!

Yes, I think it would be very helpful to mention that there will be an answer given later. It can be extremely frustrating if you're unable to answer a question and you've no way to get a resolution.

justinmeiners commented 3 years ago

I opened an issue to do just that. Now to think of the best way to go about it..