View UserDefaults+Codable.swift
// UserDefaults+Codable.swift
// Converter UltraLight
// Created by Brent Royal-Gordon on 8/31/17.
// Copyright © 2017 Architechies. All rights reserved.
// MIT-licensed, go nuts with it.
import Foundation
View UICollectionViewLayout+indexPaths.swift
// UICollectionViewLayout+indexPaths.swift
// Converter Calc
// Created by Brent Royal-Gordon on 7/26/17.
// Copyright © 2017 Architechies. All rights reserved.
import UIKit
View Example.swift
import Foundation
import ExplicitlyConvertible
let i8: Int8 = 8
let i64: Int64 = 64
i64 + ^i8 // => 72
struct Person {
var name: String
View Tuple.swift
// First, let's test out the basic design. This is basically just an
// HList.
// This recurses to the right because that makes subscripting simpler,
// at the cost of making appending impossible to generalize.
public protocol TupleProtocol: RandomAccessCollection
where Index == Int, IndexDistance == Int, Element == Any
associatedtype First
associatedtype Rest //: TupleProtocol
View JSONFeed.swift
import Foundation
let feedURL = URL(string: "")!
// MARK: Basic models
// We do not model the `userComment` field because it is not supposed to be used by
// machines. We do not model extensions because they should be ignored unless
// supported anyway.
struct Feed {
View gist:daa9e2112f9c6aa4a5720cf5e81febb6
<?xml version="1.0"?>
\( "")
typealias ChapterTuple = (heading: String)
typealias BookTuple = (id: String, author: String, title: String, genre: String, price: String, chapters: [ChapterTuple])
View Formatter.swift
protocol Formatter {
associatedtype Input
associatedtype Output
func format(_ input: Input) -> Output
protocol CombiningFormatter: Formatter where
InnerFormatter.Output == CombinedFormatter.Input
View LocalizableString-new-interpolation.swift
import Foundation
public protocol LocalizableArgument {
var localizableFormat: String { get }
var localizableFormatArguments: [CVarArg] { get }
extension LocalizableArgument where Self: CVarArg {
public var localizableFormatArguments: [CVarArg] {
return [self]

Fix ExpressibleByStringInterpolation


String interpolation is a simple and powerful feature for expressing


The problem with Metatype as a keyword is that it's one level of abstraction too far up.

Think about a typical type name: Int, UIViewController, Record. What you'll notice about the type name is that it's a description of the instances of that type, not a description of the type itself. You don't see types with names like IntStruct or UIViewControllerClass except in beginner code.

Just as UIViewController is a class, UIViewController.Type (to use current terminology) is a metatype. But that doesn't mean the word "metatype" belongs in its name, any more than the word "class" belongs in UIViewController. The type name describes the instances of that type, and the instances of UIViewController.Type are types, so Type, not Metatype, is the appropriate word.

That's why I say that we should use Type<T>, not Metatype<T>—because Metatype<T> would have the same mistake as UIViewControllerClass.