hwayne/learntla-v2

Improvements to Operators and Value chapter

Opened this issue · 0 comments

acud commented

Greetings,

I've identified a couple of minor points that can be improved in the aforementioned chapter.

The first is the following paragraph:

There is one more boolean operator of note: =>, or “implication”. A => B means “A is at least as true as B”. A => B = FALSE when false if A is true and B is false, otherwise it’s true. B is true or A is false (or both). You don’t see this very often in programming, as it’s pretty useless for control flow. But it’s extremely important for any kind of specification work. We’ll go into more detail about it later.2

As feedback, I feel that it can be improved in the following manner(s):

  • The syntax of equality checks (single =) vs assignment == is not very clearly introduced prior to this point and so at first glance it is not clear that the expression A=>B=FALSE means the expression ... equals FALSE. It might be useful to add a short sentence in parenthesis afterwards which clearly articulates that the whole expression evaluates to FALSE
  • after the expression the sentences just barely add up. A=>B = FALSE _when false if_.... I'm not 100% sure if it's just me but it is quite difficult to read. Since this operator is very important I would suggest to improve the wording somehow. Adding a truth table would be a plus. Even after going through this phrasing multiple times over and over it is very unclear how this behave. Another suggestion would be to describe it in logic gates terms (is it a XNOR?)

In the section of contrapositives exercise:

  • It is not clear what does "regular three" refers to (perhaps explicitly naming the operators or at least namedropping the term "regular three" in the boolean operators section just above).
  • The question For what values of A and B is ~B => ~A true? is phrased a bit misleadingly - as a reader I infer I need to find the values for which the expression yields a TRUE i.e. find the actual values of A and B in this case. It is not clear that a new implication need be written

In the summary section, adding the implication with a very short explainer would be helpful.