Oliver
banner
orjcodes.bsky.social
Oliver
@orjcodes.bsky.social
Software engineer specialising in Apple platforms (Swift, iOS, iPadOS, macOS, etc). Native apps, local first.
That final example is probably better done with flatMap.
April 16, 2025 at 9:52 PM
Tariffs are also a transfer of wealth from the poor to the rich.

For the poor, prices on goods go up. For the rich (eg, shareholders) it is a chance to increase prices on non-tariffed goods so that they extract extra profits.

Inflation & the value of assets goes up, buying power of cash goes down.
April 7, 2025 at 12:38 PM
Maybe. I guess we’ll see at WWDC.
March 9, 2025 at 11:06 PM
It is entirely opt in though so in practice unless you turn that option on nothing changes.

It will mean that things like Xcode templates for CLIs and the like can have it turned on by default and it might make upgrading some exisiting Swift modules to Swift 6 simpler.
March 9, 2025 at 8:32 AM
Isn’t your original article out of date with respect to View? Because View is now annotated with @MainActor doesn’t that mean all methods on a View are also MainActor annotated by default? So if you have a startTask() method on a view the nested Task {} closure will inherit the MainActor isolation.
March 9, 2025 at 8:27 AM
Also, I’m pretty sure async let statements start executing as soon as they are declared not when they are awaited. Just like let t = Task {} starts immediately whether or not you await t.value.
February 23, 2025 at 10:53 AM
Really? I’m suspicious of that assertion.

The try await on the async let expressions are unnecessary in the example and given that async let is effectively a hidden TaskGroup I feel like your first answer is the correct one.

But maybe I’m wrong. I should probably write a test.
February 23, 2025 at 10:51 AM
I see. As always the right choice is always “it depends”. Thanks for explaining the context that made you make the choice you did.
February 7, 2025 at 2:24 AM
From the blog it seems you were matching URIs with UUIDs. I guess I would have just split the URI path then attempted to get the UUID from one of the parts.
February 5, 2025 at 11:53 PM
Super curious what the use case was for using a Regex.
February 5, 2025 at 11:51 PM
Why not just use UUID(uuidString:)?
February 5, 2025 at 11:50 PM
I just saw someone walking past the cafe I’m in wearing the t-shirt. :)
February 5, 2025 at 11:48 PM
I almost never use forEach. Use cases where it is preferred over a simple for loop are few and far between for me.
February 5, 2025 at 10:52 PM
Given that footage we might have even been standing close to each other. Haha. 😂
February 5, 2025 at 10:45 PM
Oh neat. I was there too.
February 5, 2025 at 10:44 PM
I’ve found that confirmations are good when you want to confirm that callbacks are executed. Ie you have an async function that will call stuff and you want to confirm that it called that stuff.

But as you say, it’s not suited to completion handlers.
December 8, 2024 at 1:05 AM