What on earth is "inout"?
inout
may be the most baffling API in the Swift language. At first sight, it seems pretty straightforward.
inout
may be the most baffling API in the Swift language. At first sight, it seems pretty straightforward.
Consider the following Swift code:
»I used to host websites and web app services at home. However, as I recently moved and the Internet setup at the new house is quite different—my ISP at home uses a giant central router to divide Internet access to each room. That is, a classic Double NAT scenerio. This is not a big deal if you are not trying to access your devices from outside the local network. However, when you need to do that, you will find it impossible because you have no access to the port forwarding features of the central router of the ISP.
»SwiftUI was the UI framework Apple announced during the World Wide Developers Conference (WWDC) 2019. As to support this framework in your app would require the users to update to the latest operating system versions as of the year, iOS 13 and macOS Catalina, it is expected that most of the apps that adopt SwiftUI today are still majorly side projects or smaller apps.
»Recently, when I was looking at an old solution I wrote months ago for a LeetCode problem, How many numbers are smaller than the current number, I suddenly found that although my previous solution used some tricks in an attempt to do it faster, the function I used made it as slow as the time complexity of a brute force solution.
»