Rob Napier

@cocoaphony
2.5K Followers
537 Following
4.3K Posts
Swift and Go. Love 'em both. They make me mad in completely different ways. Infosec as required. robnapier.net
Cocoaphony Bloghttps://robnapier.net
GitHubhttps://github.com/rnapier
Twitter (defunct)https://twitter.com/cocoaphony

@Drwave I was 48 when Covid stopped me cutting my hair. I grew it out the way I wanted to since I was 20. And at various points I’ve been worried that maybe I wouldn’t look right at 60. But my neighbor at 60-something had aging hippy hair he’d grown out when he retired, and I thought no, I absolutely want to look like him.

But you’ve inspired me to maybe a trim to get things a bit more in place, because my hair is getting a bit wild these days. I could try long without losing control.

NINETY DAYS

NINETY INCIDENTS

NINETY PERCENT

YOU PAID FOR ALL FIVE NINES BUT YOU’LL ONLY NEED THE EDGE

#github

@kayleesdevlog `scale` isn't nonisolated. (it's also a computed property, not a `let` property, but it's not nonisolated at all.)

I would expect that there are internal reasons that Apple made opacity nonisolated, and they could have wrapped it in a getter to be like the others. But there is likely history there, or a performance tweak.

But the key is that "make sure `unsafe` does not appear in the interface" is not a particularly major design goal. It shows up a bit.

@kayleesdevlog In this case, I am pretty sure the problem is that Opacity is itself an AnyTransition, and AnyTransition is not Sendable. But I'm betting the underlying transition *is* Sendable, and Apple would like to expose that. This would be the best way to express that promise without creating an extra protocol indirection (which would have a runtime cost).

Even with that, you'd probably still need the `unsafe` marking, since *this* type isn't Sendable. I don't think that's hideable.

@kayleesdevlog This indicates that `opacity` is promised by the author (Apple) to be safe to call from any context (i.e. any thread), even though the compiler can't prove it. The "unsafe" here means that you must trust the author to follow the rules rather than the compiler enforcing the rules.

For details on nonisolated(unsafe), see the SE proposal: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0412-strict-concurrency-for-global-variables.md

This annotation opts out of static checking, but not dynamic (runtime) checking, so if there are mistakes, it may crash.

@lenary @joe Ah-pe-ló-neh. As was always intended.
If only this WWDC wasn‘t happening in the USA… land of the ICE 🤷‍♂️ #wwdc26

RE: https://mastodon.social/@lapcatsoftware/116278367466232058

For me, the StM feature that’s worth the whole price. Everything else is just bonus. I hate autoplay videos so much.

Got some spare time this weekend? Why not visit https://saytheprime.com and make a short video of yourself saying some digits of the currently largest known prime number, to help contribute to our collaborative prime-saying project?
Say the Prime

We're attempting to get a collection of humans to say every digit of the newly-discovered (and currently largest-known prime number) Mersenne prime M136279841, and hope to achieve this before another larger prime is discovered.