Closed riverrun closed 4 years ago
variable scope
this is something that the user can learn about later
Do you mean by "later" in the chapter or in the book?
In the case of variable scope, "later" could also mean outside the context of the book.
Also, instead of having a whole section covering variable scope, we could just add comments to code where scope might be confusing. It looks like the book is intended for experienced programmers, and I don't think variable scope is going to be that confusing.
In the case of writing a mix task, "later" means later in the book (as long as we can think of a reasonably practical example).
In the case of variable scope, "later" could also mean outside the context of the book.
We need to cover variable scope because I expect many Rails developers to read the book. There you have @foobar variables which are accessible anywhere. We have to make clear that this is not the case in Phoenix.
I still don't think we need a whole section to cover variable scope, but I will keep it as it is for the moment.
Parts that I think we can remove:
{:module ...}
return value when defining a moduleParts that we can simplify:
DateTime
, and then add links to the docs for the other date / time types~
introduces a sigil and then provide brief examples of using the regex and string sigils