Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This article is about actors in the Swift programming language, and I’d answer the question (“is a stateless actor pointless?”) differently: there is no such thing as a stateless actor in Swift.

Every actor in Swift conforms to the Actor protocol, which has one requirement: an instance property named `unownedExecutor`. Swift uses this property implicitly when, for example, the program calls a method on the actor from outside the actor.

https://developer.apple.com/documentation/swift/actor/unowne...

(One could also argue that, because every actor type is a reference type, every actor also has its identity as part of its state.)

 help



>This article is about actors in the Swift programming language

Glad I checked the comments first, I had assumed it was stateless people that were actors. Stateless people are kind of an interesting topic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: