Can anyone explain in detail about the technical difference between ! & ? literals that we are using in swift language. Basically in apple developer document they mentioned it as the nil validation but i didn't understand clearly about the logic behind it. Can you one explain with some real time logic for the same.
Thanks in advance for the user.
"Technical" means related to a "technique", a specialized method or procedure, but it can also mean related to machines. "Technological" can also mean related to machines, but now it usually refers to modern electronic machines.
Technical writing is meant for experts in their field, while non-technical content is usually written for the general audience who aren't familiar with certain technical terms. This article will explain the key differences between technical and non-technical content writing.
Technicians are the "doers" and are tasked with completing projects, whereas engineers are responsible for designing and implementing those projects. Problem-solving abilities: Engineers are required to identify problems and devise solutions to fix those problems, while technicians simply put into action the solutions.
Software's are computer programs that run on computer. Technology are things developed to solve specific problems. It is used to create non-physical tool to solve any information based problem. It is used in production of goods or services to accomplish objective.
Optional Chaining as an Alternative to Forced Unwrapping
You specify optional chaining by placing a question mark (?) after the optional value on which you wish to call a property, method or subscript if the optional is non-nil. This is very similar to placing an exclamation mark (!) after an optional value to force the unwrapping of its value. The main difference is that optional chaining fails gracefully when the optional is nil, whereas forced unwrapping triggers a runtime error when the optional is nil.
— The Swift Programming Language (emphasis added)
Nobody's going to be able to explain it more simply than that. What don't you understand?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With