New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[style] Rename trait type names from I$Name
to $Name
#727
Comments
This is from cc @drmingdrmer |
For me, the greatest benefit is knowing at first sight what kind of symbol it is. (Maybe) makes it easier to search for something through plain text, e.g., when you do not know the exact name of it. (Maybe) the prefix "I" can reduce name conflicts. Having one more letter does not bother me, although this is not very rust. Vote for keeping it :DDD |
I prefer not to use the |
Thank you very much for this suggestion, from rustacean view should not have I. Vote for keeping I. |
I vote for the idiomatic style |
Vote for this change. Type is explicit or can be easily identified by "find definition". We have advanced too much from text only ages. |
Wow, votes status: But datafuse have some conflicts after rename: If we rename IDataSource to DataSource, how to deal the struct name? |
Remove Till we have multiple impls for an "IDataSource", and at that time we will have different names for impls naturally. |
IMHO here the discussion should not be about which style is better, but be about whether it's a good time to apply this change. Changing it brings in extra refactoring work and name/type conflict. |
Roger that |
Hi, any update here? |
I guess @dantengsky PR can be opened again at any time |
@TennyZhuang @BohuTANG I'd like to re-open the PR (rebased with master branch) later today. |
Cool, Thanks. |
Sound great to me to follow the guideline. |
Summary
E.g: rename
ITable
toTable
. There is no point to addI
prefix before a trait.In rust, A trait type has two usages:
Where T: Table
, we can know Table is a trait as soon as we see it.Box<dyn Table>
, dyn trait requires exiplit dyn keyword, there is also no confusion at all.For the reason above, trait named with
I$Name
is meaningless.The text was updated successfully, but these errors were encountered: