Official errata thread for Dart Apprentice, First Edition!
Hello, I think there is a typo in:
Before You Begin
- 5th Paragraph: “There’s a good chance… fast native applications across mobile and desktop desktop platforms …embedded devices.”
- iv. Introduction
Thank you for catching that. I’ve fixed it in the source text so it should get updated in the online version soon.
I think that there is a small typo in the abstract classes section (Ch. 9):
“Don’t be put of by the word “abstract”. It’s no more difficult that the idea of an animal.”
“of” should be “off”
Thanks for the wonderful book
It’s amazing how many times I can proofread a chapter and still miss miss things like this! Thanks a lot for catching that and reporting it. I’ve corrected the source text now and hopefully the website should be updated soon.
Error in Chapter 6 - Factory constructors:
This is actually highly desireable in the case here because if
'String'didn’t exist in the map, then your app would crash because you aren’t handling
'String' should be
'name' here, since we’re talking about
Also, “desireable” should be “desirable,” which I discovered on my way to reporting the above error.
Thank you very much for catching those mistakes! I’ve updated the repo so the online version should get the changes soon.
I saw this in Chapter 3 - Casting down:
To get the this error
_CastError (type ‘int’ is not a subtype of type ‘double’ in type cast)
'num someNumber =3;' must be
'int someNumber =3;'
num someNumber = 3; also causes the error you quoted above. The reason is that while the compile-time type of
num, the run-time type is actually an
3 is an
It would probably be useful to clarify the explanation or change the example in the next edition of the book, though.
Chapter 4 - Control Flow.
1st Para: "The int type is for whole numbers while the double type is for decimal numbers. "
The int type is for integer would be better as whole number just signifies 0 and positive natural number.
That’s a good point. I wasn’t thinking clearly about the mathematical meaning of whole numbers. I’ve made the change in the Editions 2.0 version that we’re working on now. Hopefully it should be published in August or September.
This topic was automatically closed after 4 hours. New replies are no longer allowed.