Mohammad Faani
Jul 22, 2017 · 1 min read

Great post. Because I recently learned about asserts and know that a newbie might ask “how are asserts and errors different” ?

I would say:

Asserts are similar to errors with try! as in both mean something didn’t go right. Yet have the following differences:

1. Asserts break execution meaning there is no way to catch or have a fallback. 2. Asserts can be configured to not work in release and only work in debug. Errors always work regardless of any scheme. 3. Asserts can have a specific log message.

    Mohammad Faani

    Written by

    iOS dev: https://stackoverflow.com/users/story/5175709

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade