Skip to content

Conversation

@mattmassicotte
Copy link

I was just brainstorming a bit, mostly on stuff we already spoke about. I couldn't figure out a good way to comment on what you already had, so I just threw some stuff in here. I actually don't really like how I've worked or organized things. And the section title is obviously silly. But maybe a starting point?

@mattmassicotte
Copy link
Author

I think the Isolation domains has fantastic detail! I learned new things already! But, it's quite dense. There are many potentially entirely-new concepts introduced. I think more sections, with more example code would help. What do you think?

I also totally agree that ultimately this content would be excellent for the book.

@mattmassicotte
Copy link
Author

The isolation inference rules are complex, yet have major implications on even the most casual of concurrency users. I think it could help to spell them out like has already been done, but also have an example for each with a little rationale. Otherwise, they can see quite esoteric.

@mattmassicotte
Copy link
Author

"Switching between isolation domains"

Gotta have an example with await in here!

func nonIsolatedFunction() async {
  // start off non-isolated
  let actor = MyActor()

  // switch to the actor
  await actor.increment()

  // and back!
}

@mattmassicotte
Copy link
Author

mattmassicotte commented Mar 16, 2024

I love everything about the "Sendable types" section. It's so good!

(but sendable closures and captures aren't covered yet and for sure we have to get to that)

@mattmassicotte
Copy link
Author

Ok, super-high-level. You are here and you want help migrating. That will involve:

  • learning
  • turning on warnings
  • fixing problems/looking at examples

But I think the path you take will depend heavily on where you are now (single-module app/small team, multi-module app/big team, library author, how much concurrency you have already started using) and how you like learning. I'm sure many people will want to try to read and internalize all the concepts up-front. But personally, I'm horrible at that!

What do you think about also, up front, outlining some strategies? And then within those, get tactical about how to solve specific problems AND how to understand the concepts that are involved it in.

I think it was really wise to focus on a well-structured format right up front, because it will make it easier for people to get what they want out of the content without having to also consume the entire thing.

@hborla
Copy link
Owner

hborla commented Apr 2, 2024

I'm so sorry, I completely missed this when you put up the PR. I will go through your feedback today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants