Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Funny you mention C#, as I was implementing in C# when I thought of the question. And I've also found the only 2 common conventions of C# to be I for interfaces and Exception extension on built in Exception. Commented Mar 4, 2021 at 5:43
  • The I prefix is a C# thing not a Java thing. Java is perfectly happy to respect client codes right to not know if it's talking to an interface or a concrete type. Now if only Java respected that in its binaries so you wouldn't have to recompile the client when you switch from concrete to interface. We probably wouldn't have so many premature interfaces. Commented Mar 4, 2021 at 7:42
  • 1
    Thank you. I've only ever seen the I prefix in Java when C# programmers are working in Java and haven't had their first code review in Java. Commented Mar 4, 2021 at 8:09
  • 1
    One more for C# is Attribute classes always end with Attribute. Commented Mar 4, 2021 at 13:47
  • 1
    @quaabaam sadly, yes. The fundamental problem is trying to encode structural info (like that this is a base class) in the semantics (the name). I want domain info in my names. Stop avoiding thinking of good names by sticking a warts on a bad one. Commented Aug 16 at 19:01