本文介绍了匈牙利记数法的反义词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数程序员都知道一种叫做匈牙利符号"的东西,每个变量都有一个漂亮的前缀来表示其数据类型,即

Most programmers know of a thing called 'Hungarian Notation', each variable has a nice prefix to denote its data type, i.e.

bIsExciting = false;    // Boolean
strName = "Gonzo";      // String
iNumber = 10;           // Integer

虽然这种表示法不受欢迎,但我看到(在工作中,在互联网等情况下)许多数据类型指示符作为变量的后缀"后缀"添加到了变量,例如

While this style of notation has fallen out of favor, I am seeing (at work, internet, etc.) a lot of data type indicators added as a 'suffix' to variable names, i.e.

NameStr = "Gonzo";        // String
NumberInt = 10;           // Integer
MyRideBike = new Bike();  // Bicycle

当数据类型后缀为 到变量名时,是否为此命名?

Is there a name for this, when the data type is suffixed to a variable name?

为澄清...,这样的事情是否有一个不同的名称?如果不是这样,一定会赞赏一些简洁关于如何称呼它的想法.

To clarify..., is there a distinct name for such a thing? If not, some concise ideas on what to call it would certainly be appreciated.

推荐答案

我将其称为反向匈牙利符号,这与波兰语符号和反向波兰语符号之间的差异是一致的.

I would call this reverse hungarian notation which would be consistent with the difference between polish notation and reverse polish notation.

此外,billmcc在以下链接上的帖子还显示了反向匈牙利符号"一词在现实生活中的用法

Additionally billmcc's post on the following link shows real life usage of the term "reverse hungarian notation"What was the strangest coding standard rule that you were forced to follow?

这篇关于匈牙利记数法的反义词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 23:24