Вопрос

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