Unpopular opinion: assertions are great, but should only be used for problems that cannot be detected immediately at runtime.
E.g. there’s no need to check that an Optional is non-nil before force-unwrapping it, or that an index is contained within the bounds of a Collection; the Swift runtime is _guaranteed_ to trap for these. All you’re doing is adding clutter.
E.g. there’s no need to check that an Optional is non-nil before force-unwrapping it, or that an index is contained within the bounds of a Collection; the Swift runtime is _guaranteed_ to trap for these. All you’re doing is adding clutter.

