Use The New Type Placeholder Declaration With Underscores
Daily Coding Tip 120
There’s actually a way to specify a type you want Swift to infer.
When you initialise a new variable with
"Hello world", it is not necessary to specify that it will be a string. Swift will infer that this is the type you want from the fact that you have initialised it with a string literal.
I have a simple enum with cases c…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.