Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

scuff_d

1
Posts
A member registered 63 days ago

Recent community posts

(1 edit)

Created an account just so I could comment. 

What a fantastic book. Best 20 bucks I've spent in a long time. I love that you spend time explaining how things work under the hood, it really helps interanalize the language. Your example code is also very easy to follow and helps clarify things a lot. A good example is worth a 1000 words :)

If I can offer some minor feedback. Section 16.1 talks about boolean returns. The example you give is scanning a slice for a string. If a matching string isn't found the procedure returns false, which you refer to as an error. I think there is a subtle but important distinction here, because that's actually a successful result, not an error. The string doesn't exist in the slice, which is an expexted situation and useful information for the callee. In this case the boolean isn't so much conveying error information, as it is the status of the query. Still a very useful use case, but distinct from an error. Errors, at least IMO, should be reserves for a failure related to the inability to properly complete the work being done by a proceedure, such as a network failure or inability to read a file (outside the scope of that example obviously).

This section also seems like it comes really late in the book. As I was reading I kind of expected to find that section somewhere near the section on procedures, since it's part of dealing with procedure returns. 


Edit: I realize the bulk of that comment ended being the feedback part. Sorry about that. Seriously great book. Thank you so much for writing it :)