سؤال

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