sam_perez
Joined 7 years ago
Joined 7 years ago
Too bad you can't do the same with phone numbers.
Do you think it's usable for learning? Seems like you could end up with some quirky learnings.
Just did not expect to be gazing into the windows of someone's soul immediately. The widescreen monitor may have contributed.
----------------------------
This controller is intentionally written in a very verbose style. You will notice:
1. Every 'if' statement has a matching 'else' (exception: simple error checks for a client API call)
2. Things that may seem obvious are commented explicitly We call this style 'space shuttle style'. Space shuttle style is meant to ensure that every branch and condition is considered and accounted for - the same way code is written at NASA for applications like the space shuttle.
----------------------------
^^^^
This bit reminds me of exhaustive checks in typescript code. I try to use them all the time.
https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...
But I suppose it's more about what you're tracking? For example, instead of tracking reference counts to variable, they're tracking reference counts to each scope. Then, if a scope has no more references, the variables it owns are cleaned up.