[Suggestion] moving the operator overloading explanation to book 1

Hi in chapter 9 enhanced enums, I suggest moving the explanation of operator overloading to a suitable place in book1.

This is because this is quite similar to method overriding and can be introduced earlier. People can just finish book1 to know what is operator overloading and no need to read until the half of book2 to know that.

Oh, may be moving to earlier chapter of book 2. Introducing it together with inheritance?

That’s a reasonable suggestion. Let me consider it more carefully when we do the next update.

In the original Dart Apprentice I tried to cover related topics all together. For example, I taught functions and anonymous functions together. I wanted to make the book more like a reference and if people were going to look up anonymous functions, they would expect to find it in the functions chapter. However, one of my tech editors pointed out that anonymous functions never made sense to him until he learned collections. So in the rewrite, we changed the teaching style of the book. Rather than trying to group all related concepts together, we tried to teach concepts in the order one would naturally need them as they progressed in depth. Thus, anonymous functions and certain other topics were moved to the second book.

Operator overloading isn’t commonly used (at least in my own experience) so I’m not sure that it’s really needed in the Fundamentals book, but it might be helpful to mention it as a forward reference. Something like “You can also override operators just like you would a method. See DABB chapter X for more.”

I agree that it’s kind of random to find it in the enhanced enums chapter, so it might make sense to put it earlier in the book in a more logical place.

2 Likes