> Consider naming an interface without an I prefix.
They give the same recommendation in the Typescript style guide, but I still don't understand why.
> Consider naming an interface without an I prefix.
They give the same recommendation in the Typescript style guide, but I still don't understand why.
You shouldn't need to know whether the client is using an interface or an implementation class. List represents a list, and a User represents a user - not an IUser. Another problem with using I, is that (oddly) we use it to communication the implementation decision of using an interface. Usually we don't want implementation decisions expressed so loudly, because that makes them hard to change.
[0]http://programmers.stackexchange.com/questions/117348/should...
[1]http://stackoverflow.com/questions/541912/interface-naming-i...
[2]http://stackoverflow.com/questions/5816951/prefixing-interfa...
[3]https://blogs.msdn.microsoft.com/brada/2004/02/03/why-do-int...
To me, it still seems more about people's gripe over the very existence of interfaces.
If anything, using IUser in lieu of User is a pretty clear signal to, say, an uninitiated developer, that you shouldn't be attempting to create an instance of "IUser."