Skip to content
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 03-03: Add one more "why" #810

Open
stasberkov opened this issue Jan 31, 2017 · 3 comments
Open

Style 03-03: Add one more "why" #810

stasberkov opened this issue Jan 31, 2017 · 3 comments

Comments

@stasberkov
Copy link

stasberkov commented Jan 31, 2017

Is is hard to persuade developers with C# background to name interfaces without I prefix. The following "Why" could be helpful: Naming interfaced without I forces developers to give proper name to abstraction and concrete implementation, emphasizing their differences e.g. SportsCar->Car, SuvCar->Car vs just Car->ICar.
Please add it to ng2 style guide.

@iuliuvisovan
Copy link
Contributor

Mfw I've been writing C# for ages and then a guy tells me "List" in java is an interface.

@pringshia
Copy link

The Angular 2 interfaces don't follow this style, e.g. CanActivate, OnInit

@dietergeerts
Copy link

dietergeerts commented Apr 3, 2017

I dissagree on not naming interfaces with an I, because when you just see the code files, you can't tell if it's an interface or not...... The I is very helpful here! It has nothing to do with not being able to name the actual abstraction, @stasberkov, it's all about code readability.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants