AllenDowney / ThinkPython2

LaTeX source and supporting code for Think Python, 2nd edition, by Allen Downey.
Other
2.49k stars 1.65k forks source link

Suddenly confusing passage on page 169, 17.11 #92

Open Bob-Builderson opened 2 years ago

Bob-Builderson commented 2 years ago

"A design principle that helps achieve that goal is to keep interfaces separate from implementations. For objects, that means that the methods a class provides should not depend on how the attributes are represented."

Your earlier definitions: Chapter 4 "interface: A description of how to use a function, including the name and descriptions of the arguments and return value." Chapter 11 "implementation: A way of performing a computation."

So rewritten with your definitions: A design principle that helps achieve that goal is to keep descriptions of how to use functions, (including the names and descriptions of the arguments and return values) separate from ways of preforming a computation.

So... I should keep my descriptions of how a function works (like comments?) separate from the ways I preform a computation... (like the actual code...)??

Again, maybe it's just me being too dumb, but it sounds more like: you want to use a cutesy phrase that has some meaning in computer science circles- in an introductory computer science textbook.

I'm fine with introducing jargon (like you have done excellently throughout the rest of the book) but I don't like it when you introduce it without an explanation.

Here's my own cute phrase for what I mean: "Jargon without explanation is frustration."