Instead of explaning I'll provide a simple and short example:

I would call a class that parses XMLs XMLParser. Sometime I run into problems, e.g. I want to create a class that labels XMLs, but XMLLabeler seems kind of odd, because of the two same letters.

Since XML is a wide spread term it should be no problem to resolve this 'issue', but for more complex acronyms this leaves a bad taste.

How would you handle these kind of things? Stricty applying camel case? I. e. XmlParser, XmlLabeler? Are there any naming conventions for acronyms in class names?

有帮助吗?

解决方案

Camel Case (XmlParser) is the preferred way because it is easier to read

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top