Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Pages 108, 110, and 111: The given console output of SimpleStringOwner on page 111 is wrong relative to the prior code. #77
Page 111 claims that this code:
...will print "Constructed: x" (etc) but it actually won't.
It will instead print "Constructed: : x" (etc) due to the contents of the source code on pages 108 and 110.
The original SimpleString code already adds a colon and a space to tags for its tagged print function, but the later code is designed as if this wasn't the case. These two sections of the book are probably from different revisions of the book that were created during its writing.
Here's the original print function from SimpleString:
...and here's how it is used later:
Notice the implications of that.