In this week's sync call, @Praetonus mentioned that the compiler is missing out on recognizing some constructs as safe.
Particularly, he noted that the current rule for automatic receiver recovery is more restrictive than it needs to be.
The gist of the current rule is that we can automatically recover the receiver if all the arguments and the return value are sendable. @Praetonus mentioned that this rule could be tweaked to allow recovering one of the arguments instead, if the receiver and all other arguments are sendable. This makes sense in the context of thinking about the receiver in Pony as being just another argument to the function.
The purpose of this ticket is to discuss and track work for that rule enhancement.
In this week's sync call, @Praetonus mentioned that the compiler is missing out on recognizing some constructs as safe.
Particularly, he noted that the current rule for automatic receiver recovery is more restrictive than it needs to be.
The gist of the current rule is that we can automatically recover the receiver if all the arguments and the return value are sendable. @Praetonus mentioned that this rule could be tweaked to allow recovering one of the arguments instead, if the receiver and all other arguments are sendable. This makes sense in the context of thinking about the receiver in Pony as being just another argument to the function.
The purpose of this ticket is to discuss and track work for that rule enhancement.