A class marked as "async" can still have regular methods, which are only
available to the inside of the class (i.e. the process itself, not other
processes sending messages to it). So you can do something like this:
class async SomeProcess {
fn async some_message(...) {
...
some_helper_method
}
fn some_helper_method {
...
}
}
SomeProcess {}.some_message # This is fine
SomeProcess {}.some_message # This is a compile-time error
I toyed with the idea of _not_ allowing regular method and thus implicitly
making all of them async for an async class, but that might lead to a pattern of
async classes being "mirrored" by non-async "helper" classes just to reuse some
methods between the different messages of an async class, i.e. you end up with
this: class async SomeProcess {
fn some_message(...) {
SomeProcessHelper {}.some_random_method
}
}
class SomeProcessHelper {
fn some_random_method {
...
}
}