Radbuglet / autoken

A rust-lang compiler tool adding support for automated borrow-aware context passing
https://docs.rs/autoken/0.1.0/autoken/
MIT License
7 stars 0 forks source link

pub MyType = OtherType isn't very clear #1

Open bestouff opened 3 months ago

bestouff commented 3 months ago

pub MyType = OtherType doesn't stand out very much (the equal sign looks a bit like a colon).
How about adding the type keyword, like for declaring a regular type ?

Radbuglet commented 3 months ago

Yeah, that's a fair suggestion; especially considering the way in which cap! is overloaded for three different operations. I didn't use a keyword because I was worried users misread the intention of the definition since they're defining a capability—not a type.

Maybe cap would be a less confusing keyword?

bestouff commented 3 months ago

I don't know. But to me it's already surrounded by cap so the meaning with type is clear. As clear as the other (already overloaded) operations found within cap.