Cuis-Smalltalk / TheCuisBook

A book about Cuis Smalltalk
64 stars 9 forks source link

Clarify the explanation of cascades. #7

Closed matta closed 3 years ago

matta commented 3 years ago

The new wording explains what a cascade is first, then its basic syntax, then gives an example. I found this clearer than mixing the explanation of what a cascade is with descriptions of two contrasting examples, one of them far from the current text.

matta commented 3 years ago

I re-read both the diff and the commit message. I feel it is complete. It would help me to hear from you what you found confusing about it.

Alternatively, we can just drop this PR. I found it confusing to refer back to an example that was far back in the text (I happened to read the two sections on different days). I think it would be slightly better to describe a cascade in a simpler way, but the way I did it in this PR is only one possibility.

hilaire commented 3 years ago

If I am not wrong, should it not be written as:

To send multiple messages to the same receiver a @dfn{cascade} can be used to state the receiver once, followed by the cascade of messages separated by semicolons. Here is our earlier @ref{hello2} code expressed with a cascade:

matta commented 3 years ago

Of course! I have fixed that up in this PR.