Category: Swift

  • Consider the Following – Part 2

    Consider the Following – Part 2

    Last time we explored the notion of “code isomorphisms” – that is to say, code that is functionally identical but uses a different syntax to express the particular idea under consideration, i.e. we’re talking about the pros and cons of different ways of writing the same code.  In particular, we pointed out that Swift has…

    Read article →

  • Consider the Following

    Consider the Following

    Hi, my name is Van Simmons and I’m a team lead here at AO Labs.  Welcome to my new blog where we’ll be working in some corners of the Apple ecosystem that don’t seem to be all that heavily frequented. The idea behind this blog and the inspiration for the title is that every couple…

    Read article →

  • The Tuple Pattern

    The Tuple Pattern

    In Swift, a tuple is a parenthesized list of two or more elements of any type. For example, (0.5, “foo”) is a tuple where the first element is a Double, and the second is a String. One of the key benefits tuples provide is that they make it possible to write a method or function that returns more than one value.…

    Read article →

  • The Swift Enumeration Case Pattern

    The Swift Enumeration Case Pattern

    When I first started working with enumerations and switch statements in Swift, I found them immediately easy to use. I also appreciated the usefulness of being able to add properties and methods to an enumeration. Very nice! However there were a number of subtleties that eluded me initially, and took some time to fully appreciate.…

    Read article →

  • Modeling JSON Mappings – Part 1

    Modeling JSON Mappings – Part 1

    iOS apps commonly store and retrieve JSON data via REST APIs. Consequently, many development teams initially spend some time formulating an approach for decoding model objects from JSON, and (usually) vice versa. And due diligence requires sifting through a substantial number of frameworks, both in Objective-C and Swift, that provide varying degrees of support for…

    Read article →