|
本帖最后由 lee1892 于 2013-1-31 15:57 编辑
歪楼歪楼
也因为他是匈牙利人,所以把这个命名规则叫做匈牙利命名法来纪念他。
(这也是西方人的命名习惯,以发明人或事件相关人命名。)
这又是哪找来的?
俺Wiki到的:
The notation is a reference to Simonyi's nation of origin; Hungarian people's names are "reversed" compared to most other European names; the family name precedes the given name. For example, the anglicized name "Charles Simonyi" in Hungarian was originally "Simonyi Charles" (Simonyi Károly in Hungarian). In the same way the type name precedes the "given name" in Hungarian notation rather than the more natural, to most Europeans, Smalltalk "type last" naming style e.g. aPoint and lastPoint. This latter naming style was most common at Xerox PARC during Simonyi's tenure there.
说得是匈牙利人的名字跟俺们一样是姓在前名在后(难道是匈奴人受咱汉人影响?),而Simonyi所处时期的习惯是把变量类型放在变量名后面。
题外话,匈牙利在欧洲是非常特殊的一个民族,据考证是匈奴人后裔,话说那是被咱老祖先打跑的,都能到欧洲抢块大地盘。
liucqa 你找错资料了,看这里http://www.cnblogs.com/xuxn/archive/2012/05/16/real-hungarian-notation.html 发表于 2013-1-31 15:31
这个博文也不咋地,俺还是比较相信E文的Wiki
Where Systems notation and Apps notation differ is in the purpose of the prefixes.
In Systems Hungarian notation, the prefix encodes the actual data type of the variable.
Apps Hungarian notation strives to encode the logical data type rather than the physical data type; in this way, it gives a hint as to what the variable's purpose is, or what it represents.
。。。。
贴多E文不好,自己查吧~ |
|