Sam Deane:
What it took me a while to get was that if we encounter an API or some source of objects that is giving us an optional X, we should probably want to turn it into a non-optional X as soon as we can. We want to push the “deal with the thing not existing” code out as far to the edges of our call graph as we can, and validate things as early as we can, and as close to the source of the objects as we can. This gives us more chance to deal with unexpected situations early before they become bad, and means that the bulk of the code doesn’t have to.
I think that the loss of the mental baggage in the rest of the code will actually be substantial in many cases, and will be a great aid to productivity (plus a small aid to efficiency).
Language Design Programming Swift Programming Language
Chuong H Nguyen (via Daniel Jalkut):
A Virginia Beach Circuit Court judge ruled that law enforcement officials can compel you to unlock your smartphone with a fingerprint, but that they can't force you to enter in your passcode or password to unlock your device. Judge Steven Frucci says that obtaining a fingerprint is like obtaining a DNA sample or a physical key, things that would have to be surrendered in an investigation anyways. Passcodes would be considered knowledge, and not a physical object, so they deserve more protection under the law.
Nick Heer:
A workaround for this, if you’re interested, is to simply shut off your iOS device before the police seize it; it will require the passcode when it wakes.
iOS iPhone Law Enforcement Legal Privacy Touch ID