PharoByExample9 icon indicating copy to clipboard operation
PharoByExample9 copied to clipboard

Comment to Chapter 13

Open mr-Serg opened this issue 3 years ago • 2 comments

p. 169 A wrong statment: "RECALL that a package may add new functionality to a class even if it does not define this class." "Recall" is wrong: there is not any word about this neither in the previous chapters nor in the next ones.

p. 170 A reference to the Listing 13-1 is missing

p. 171 "The message storeOn: writes to its argument..." - message or method?

pp. 172-173 Should be references to The Listings

p. 174 typo: "13.6 About isKindOf: and respondTo:" should be "respondsTo:"

p. 175 Question: "Since instance variables are accessed by reference, a shallow copy of an object shares its references to instance variables with the original object." Really "are variables accessed by reference"? Or variables hold references to their values? Really "shares references to instance variables"? Or shares references to values? Each instance has its own set of instance variables, so "to share references to instance variables" isn't correct on my mind.

p. 177 "Stack>>pop could easily have been implemented as follows (note that this definition is anhypothetical example and not in the Pharo 8.0 system):" but

  • the Listing 13-6 is above the text, so how it can be "as follows"
  • Pharo 8.0 or 9.0?

p. 180

  • Error in Figure 13-10: LargeInteger missing. LargePositiveInteger and LargeNegativeInteger both are subclasses of LargeInteger.
  • "The remaining operators are generically defined. For example:" - Ups, the example jumped to the Listing to the top of the page.

p.181 ">>> 100@10 "Point creation" " Should be ">>> (100@10) "Point creation" "

p. 182 Error: "Fraction>>numerator:denominator:" Should be "Fraction class >> numerator:denominator:"

p. 183 "The protocol accessing untypeable characters contains a number of convenience constructor methods such as backspace, cr, escape, euro, space, tab, and so on." - the Character class >> euro do not belongs to that protocol, but it is an extension method.

p. 185 Error: "'hello' at: 2 put: $u; yourself" - the string literal is immutable

p. 186 "The implementations in its concrete subclasses are both trivial:" again, the code jumped to the top

mr-Serg avatar Aug 04 '22 14:08 mr-Serg

I'll add to this issue, to avoid creating a new one...

p. 179 includes a sentence:

Note that Pharo has some strange equality behaviour compared to other Smalltalks. For example a symbol and a string can be equal. (We consider this to be a bug, not a feature.)

Is this correct? Should the sentence in parenthesis be:

We consider this to be a feature, not a bug.

strika avatar Mar 04 '25 06:03 strika

Indeed :) You are right. Thanks for the report.

Ducasse avatar Mar 04 '25 09:03 Ducasse