> The compiler ensures that data sent between processes is unique, meaning there are no outside references to the data. This removes the need for (deep) copying data, and makes data races impossible. Inko also supports multi-producer multi-consumer channels, allowing processes to communicate with each other without needing explicit references to each other.
Now I'm very interested. I was wondering why with 'actors' we'd still mark functions as async. It seems that a class marked async is analogous to an actor.
class async Counter {
let @value: Int
fn async mut increment {
@value += 1
}
fn async send_to(channel: Channel[Int]) {
channel.send(@value)
}
}