6
How should I treat acronyms in camelCase
? should I leave them fully uppercase or just the first letter? What would the variable look like algumaCoisaSiglaAleatoria
? Or algumaCoisaSIGLAAleatoria
?
6
How should I treat acronyms in camelCase
? should I leave them fully uppercase or just the first letter? What would the variable look like algumaCoisaSiglaAleatoria
? Or algumaCoisaSIGLAAleatoria
?
8
This has a little to do with taste, and what I always say, no matter how consistent it is. Consistency has to do with the team you work with, and it has to do with the culture of the technology used, so you should look for that information to make a decision. I know that some technologies don’t have it documented, and are even inconsistent, I’ve seen a lot of inconsistency in the use.
In general I find very ugly something all capitalized and I think it even ruins the purpose of Camel/Pascalcase, then I’d go the way of CalcularIcms()
. Thinking the same one, CalcularIr()
can get ugly too, so the solution given by Microsoft as Germano reply can make sense and get better CalcularIR()
, But I’m not so sure because even though it’s a rule, it gets a little inconsistent. This particular decision seems to be one of those things you need to use and see how it looks.
I I already answered how it should be in C#, is the culture established in this technology, so it should follow, because it ends up being consistent with it, despite having an explicit exception, but has to find the culture of its technology.
7
According to the documentation from Microsoft and following his example the correct would be algumaCoisaSiglaAleatoria
because the acronym has a length greater than two characters. When the acronym has two characters or one, the correct one would be in capital letters: systemIO
.
Browser other questions tagged encoding-style nomenclature camel-case
You are not signed in. Login or sign up in order to post.
Welcome Hugo, this would help you? How to separate "words" in Camelcase in C#? Or this: [How does Camelcase work? Where I use upper and lower case names? duplicate]
– Luiz Augusto