hatcat / cg30_issues

The public issues repository for the book "Beautiful C++"
4 stars 1 forks source link

2.3 ABI #46

Open VictorEijkhout opened 2 years ago

VictorEijkhout commented 2 years ago

"Recall the operation of a linker". I really dislike that "recall". You can only recall if the reader is guaranteed to know this, for instance if you've explained it in this book. Even then, I'd give a reference. But in this case: don't recall, just explain. Your one paragraph is fine.

Page 80: "the definition of std::string has changed. Except that that can not happen. Maybe you should make your example:

  1. you write a very useful utitlity
  2. other people build on top of it
  3. now you break the ABI by changing the internals of your utility.

Oh wait, I just got to the bottom of page 83 and you say that GCC changed its implementation of std::string. But I thought C++ stressed ABI permanency? So what is that about then?

"What is an ABI"

Isn't it customary to use capitalization: Application Binary Interface, when you spell out an acronym? (Need to check with the local Chicago wielder.)

"The need for an ABI is one of the reasons" No, the existence of an ABI is the reason.

Bottom of page 81 "Recall the guideline". I do no such thing. I thought you were going to explain that in this chapter? How can I recall what I haven't learned yet?

And maybe you should spell out that guideline a little more explicitly? The last sentence if page 83 seems to sort of state it: "Calling interfaces should only use that minimal subset of types". But you never really spell it out. The verb "use" from the title is very vague and ambiguous.