views:

116

answers:

5

Pascal case now: is it "Nontaxable", or "NonTaxable"?

+2  A: 

"Nontaxable" would be the best choice, because it is a single word.

Alternatively, you could use "NotTaxable".

NonTaxable just doesn't make much sense to me.

Wouter van Nifterick
+5  A: 

It's Nontaxable. It's just an ordinary word. Non is not a word (in English). It's just a prefix. Likewise, The prefixes un- and re- are not words in their own right, so when you put them in front of identifiers, you don't keep the rest capitalized. For example: Set, Reset; Do, Undo.


Apart from that, I have to discourage use of an identifier cast in the negative. It sounds like this is a Boolean value, and that just leads to double-negative expressions, like this:

if not Nontaxable then ...

Don't make people have to read stuff like that.

Rob Kennedy
"Non-taxable" has more meaning in the domain, hence it's use as opposed to "Taxable" (the former is the exception as opposed to the rule).
Eric Smith
A: 

For me it's "NonTaxable". It's just easier to read that way

Glen
A: 

Not enough context, but let's guess:

Nontaxable seems to come directly from the domain model.

NonTaxable seems to be a transformation from a Taxable entity in your domain model.

Apart from that, as you can see in the surrounding answers, it boils down to what convention you're using already.

Piskvor
A: 

I haven't seen "nontaxable" used (in written English) as a single word; it's usually (always?) hyphenated, as "non-taxable".

"Nontaxable" mushes those two pieces together into one word, and loses the visual separation that the hyphen normally provides. Since I'm not used to seeing it as one word, "Nontaxable", to me, would be harder to read. It looks like a single word, but it's not a word that I recognize, and I have to stop and process it.

Therefore, I would prefer "NonTaxable", because it preserves that contextual cue. It reads as two distinct units, both of which I will immediately recognize.

Joe White
The IRS spells it without the hyphen.
Rob Kennedy
Okay, I yield. The IRS would be a better authority on how to spell "nontaxable" than my gut feel would.
Joe White