"Actors are reference types, but why classes?"

This is only true if you have OO subclassing situations already. Why do you think that concurrency equates so strongly to OO subclassing?

I didn't phrase my response earlier very well, and on reflection it looks like I worded it overly strong. I'm sorry for that, I didn't mean to get overly excited, I'll try to keep tone in better check in the future.

The thing I'm observing is that you seem to have a default mental association of "actors are a kind of class" that pervades your writing. Consider your post that I was reacting to:

You are defining actors as classes by saying "actor (class)", but they aren't definitionally classes, this is something we get to decide. They are only definitionally "a reference semantic thing", which is what the whitepaper tries to point out. We get to choose both 1) their behavior/capabilities, and 2) how we explain them to Swift programmers.

What I'm observing is that there is no inherent reason for actors to provide subclassing capabilities. If that is removed, then actors are clearly not classes. In my opinion, this is a beneficial thing, because they are already "not like classes" in other ways, and this divide makes the language behavior more clear and allows us to (continue) pushing programmers away from OO and subclassing as the preferred way to model their apps.

Your points are all objections to protocol oriented programming in general. As you mention, we already have reason to make protocols more powerful, further reducing the relative power and importance of classes.

Again, I can understand where you're coming from here, but this explanation only makes sense if you have already decided that "actors are classes". If you break that association, then the explanation above doesn't make as much sense (to me at least).

-Chris

8 Likes