What is forced unwrapping? Why is it potentially unsafe?

Force unwrapping in swift is a process of converting an optional type to a non-optional type.

Force unwrapping is potentially unsafe because if the optional has no value and you try to unwrap it, this will trigger a runtime error and cause the app to crash

Comments

Popular posts from this blog

In Swift, Optionals and Optional Binding are key concepts for handling values ?

What is benifit of using higher order functions?

Swift Optionals and force unwrapping?