HNHacker News
TopNewBestAskShowJobs

timjver

213 karma · joined April 27, 2014

submissionscomments
timjver··on Swift: Things I really wanted that won’t make it
I suppose you could then simply leave out

    let task =
if you don't want to use that object any further.
timjver··on Firebase expands to become a unified app platform
Oh cool, I already sent feedback through the Firebase website but I'll do this as well.
timjver··on Firebase expands to become a unified app platform
I love Firebase, but the Swift code in the iOS guide is of really low quality. For example (https://firebase.google.com/docs/database/ios/save-data#dele...):

    if currentData.value != nil, let uid = FIRAuth.auth()?.currentUser?.uid {
        var post = currentData.value as! [String : AnyObject]
        var stars : Dictionary<String, Bool>
        stars = post["stars"] as? Dictionary<String, Bool> ?? [:]
        // ...
    }
What this should really be:

    guard let post = currentData.value as? [String : AnyObject],
    uid = FIRAuth.auth()?.currentUser?.uid else { return FIRTransactionResult.successWithValue(currentData) }

        let stars = post["stars"] as? [String : Bool] ?? [:]
        // ...
    }
timjver··on Blendle – iTunes for journalism launches in the Netherlands
Newspapers aren't really about being the first to inform people about something that has happened, but more about being very informative, well-written, objective and complete. Many articles are somewhat timeless, anyways.
← PreviousPage 3 of 3