帕斯卡情况边缘情况
现在的帕斯卡案例:是“非应税”还是“非应税”?
Pascal case now: is it "Nontaxable", or "NonTaxable"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
现在的帕斯卡案例:是“非应税”还是“非应税”?
Pascal case now: is it "Nontaxable", or "NonTaxable"?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
这是免税。 这只是一个普通的词。 Non 不是一个单词(英语)。 这只是一个前缀。 同样,前缀 un- 和 re- 本身并不是单词,因此当您将它们放在标识符前面时,无需将其余部分保持大写。 例如:设置、重置; 执行,撤消。
除此之外,我必须阻止使用否定的标识符。 听起来这是一个布尔值,这只会导致双重否定表达式,如下所示:
不要让人们必须阅读这样的内容。
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:
Don't make people have to read stuff like that.
“Nontaxable”将是最好的选择,因为它是一个单词。
或者,您可以使用“NotTaxable”。
非应税对我来说没有多大意义。
"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.
对我来说,这是“非应税”。 这样更容易阅读
For me it's "NonTaxable". It's just easier to read that way
上下文不够,但让我们猜测一下:
Nontaxable
似乎直接来自域模型。NonTaxable
似乎是域模型中Taxable
实体的转换。除此之外,正如您在周围的答案中看到的那样,它归结为您已经使用的约定。
Not enough context, but let's guess:
Nontaxable
seems to come directly from the domain model.NonTaxable
seems to be a transformation from aTaxable
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.
我还没有看到“nontaxable”(在书面英语中)被用作单个词; 它通常(总是?)连字符,表示“非应税”。
“免税”将这两部分混为一谈,并失去了连字符通常提供的视觉分隔。 由于我不习惯将其视为一个词,因此“免税”对我来说更难阅读。 它看起来像一个单词,但它不是我认识的单词,我必须停下来处理它。
因此,我更喜欢“NonTaxable”,因为它保留了上下文提示。 它读起来是两个不同的单元,我都会立即认出。
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.