faiface / par

⅋ — session types for Rust
MIT License
76 stars 0 forks source link

Send ident conflict #4

Open khionu opened 2 hours ago

khionu commented 2 hours ago

I just hit a problem where I needed to use the std trait Send. A type alias does solve this, however I think this issue might be prevalent enough where it might be best to rename par's Send, and Recv to match.

Some ideas:

My preference would be on Tx/Rx, since those have the same meaning as Send/Recv, and Give is a bit passive.

faiface commented 2 hours ago

The way I solve this in the library is I use marker::Send for the standard trait. When designing the library, I was considering naming it differently, including Give, but nothing evoked the right meaning as much as Send, plus it's consistent with academic literature. I found using marker::Send for the trait to be a better compromise.

khionu commented 15 minutes ago

Maybe Sender/Receiver then, in line with channel terminology?