一个虫一个卑念什么| 怀孕了吃什么药能打掉| 甲肝是什么病| 多保重是什么意思| 黄历今天是什么日子| 湿疹怎么治用什么药膏| 总是口腔溃疡是什么原因| 什么树没有叶| 尿微量白蛋白高是什么原因| 耳朵发热是什么预兆| 鱼头和什么搭配煲汤好| 早餐吃什么有营养| cl是什么元素| 抽血生化是查什么| 熊猫血是什么血型| 拿铁咖啡什么意思| 中国科协是什么级别| 经常吃海带有什么好处和坏处| 雪纳瑞什么颜色最贵| 梦见小青蛇是什么预兆| 男人蛋皮痒用什么药| 子宫内膜厚有什么危害| 手指甲白是什么原因| 阿尔卑斯是什么意思| 白化病是什么| 女生的逼长什么样| 从从容容的意思是什么| 3月17日是什么星座| 晚上吃什么不胖| 以什么当什么| 俄罗斯乌拉是什么意思| 6月18号是什么日子| 眉毛变白是什么原因| 什么辣椒又香又辣| 惊蛰是什么季节| 怀孕两周有什么症状| 端午节都吃什么菜好| 连翘败毒丸的功效与作用是什么| 虚劳病是什么意思| 为什么眼睛会有红血丝| 头发爱出油是什么原因| nos是什么单位| 长期喝山楂水有什么好处和坏处| 牙齿疼吃什么药| 牙疼吃什么药效果最好| 女为悦己者容是什么意思| 小孩为什么吃果糖二磷酸钠| 为什么一照相脸就歪了| crp医学上是什么意思| 什么是梨形身材| 花青素是什么颜色| eric是什么意思| 怕冷不怕热是什么体质| loho是什么牌子| 平均血红蛋白浓度偏低是什么意思| 一案双查是什么意思| 烫伤忌口不能吃什么| 什么中药补气血效果最好| 告诫是什么意思| 什么是分子| 小乌龟吃什么东西| 什么叫翡翠| 检查乳腺挂什么科| 网络cp是什么意思| 继发性闭经是什么意思| 热退疹出是什么病| 县局局长什么级别| 皮肤属于什么组织| 匪夷所思什么意思| 39属什么| 什么食物含碘高| 心肌炎查什么能查出来| 人乳头瘤病毒16型阳性是什么意思| 输血四项检查是什么| 煮茶叶蛋用什么茶| 胸闷是什么病的前兆| pms是什么意思| 宝宝经常发烧是什么原因| 乡镇派出所所长是什么级别| 后羿射日什么意思| 一人一口是什么字| 头部容易出汗是什么原因| 马叉虫是什么意思| 牛肉丸子配什么菜好吃| 头疼发热是什么原因| lively是什么意思| 什么叫石女| 脚臭用什么药最好| 衣冠禽兽指什么生肖| 虚不受补是什么意思| 爱因斯坦是什么学家| 阳痿早泄吃什么药最好| 风寒感冒吃什么药效果好| 侧睡流口水是什么原因| 网剧是什么意思| 肾阴虚的症状吃什么药| 神经内科和神经外科有什么区别| 尿液少是什么原因| 翡翠对人体有什么好处| 缺硒吃什么| 性功能障碍挂什么科| 什么是子宫内膜异位症| 牵牛花为什么叫牵牛花| 刻骨铭心是什么意思| 妇科和妇产科有什么区别| 臊子面的臊子是什么| 正常头皮是什么颜色的| c8是什么意思| 分解酒精的是什么酶| ak是什么| 浅表性胃炎吃什么药| 做胃肠镜挂什么科| 便血挂什么科| 有头皮屑用什么洗发水| 糖尿病人不能吃什么| 韩世忠为什么不救岳飞| 心衰有什么症状| 为什么说啄木鸟是树的医生| 陈旧性骨折是什么意思| 减肥期间可以喝什么茶| 感冒打什么针| 拉肚子是什么原因| 被老鼠咬了打什么疫苗| 痔疮发痒是什么原因| 黑怕是什么意思| 耳鸣是什么原因造成的| 重色轻友什么意思| 乙状结肠腺瘤是什么病| 吃槟榔有什么好处和坏处| 跪安是什么意思| 解痉镇痛酊有什么功效| 莫桑钻和钻石有什么区别| 古代新疆叫什么| 满城尽带黄金甲是什么意思| 苏武牧羊是什么意思| 听什么歌写作业快| 龙抬头是什么意思| 有白痰是什么原因| 子宫什么样子图片| 吃鱼眼睛有什么好处| pa是什么| 包皮什么年龄割最好| 脚底板痛挂什么科| 背部爱出汗是什么原因| 改姓需要什么手续| 失眠是什么意思| 乌唇是什么原因| 5月27日什么星座| 神经性头痛吃什么药效果好| 尿检ph值是什么意思| 势利眼的人有什么特征| 老人吃什么| 梦见烧火是什么意思| 导语是什么意思| 头晕什么原因引起的| 人为什么会死| 肌钙蛋白高是什么原因| 山东特产是什么生肖| 天秤座什么象| 扎西德勒是什么意思| 得了梅毒会有什么症状| 希思黎属于什么档次| 密送是什么意思| 草酸对人体有什么危害| 藏医最擅长治什么病| 葛根有什么功效| 多出汗有什么好处| 斗鱼吃什么| 什么是商业保险| 疖肿是什么| 凝血高是什么原因| mechrevo是什么牌子的电脑| kay是什么意思| 大圣是什么生肖| 来月经属于什么期| 世界上最长的单词是什么| hia是什么意思| 卧底是什么意思| 乳头变大是什么原因| 荆棘是什么意思| 头疼想吐是什么原因引起的| 皮肤痒吃什么药| 什么能代替润滑油| 竹叶青是什么茶| 胃不好适合吃什么食物| 子宫增大是什么原因造成的| 牛鞭是什么东西| 胆汁反流性胃炎吃什么药| 学美容要学些什么| 香瓜不能和什么一起吃| 肩胛骨痛是什么原因| 清明节有什么习俗| 利尿是什么意思| 胃病看什么科室| 什么是外包| 3t是什么意思| 去火喝什么茶| 什么防晒霜效果最好| 吃了山竹不能吃什么| 梦见自己大肚子快生了是什么意思| 树大招风的意思是什么| 天麻是什么| 排卵日是什么时候| 农历10月24日是什么星座| 蠢是什么意思| 自采暖是什么意思| 东面墙适合挂什么画| 卵巢早衰是什么引起的| 头上长疙瘩是什么原因| 肾钙化是什么意思| x片和ct有什么区别| 褥疮用什么药膏最好| 泌尿感染吃什么药最好| xsh是什么意思| 加拿大签证需要什么材料| 勾魂是什么意思| 莘莘学子是什么意思| ST是什么| 什么蔬菜吸脂减肥| 海鲜中毒有什么反应| 什么东西化痰效果最好最快| 突然心跳加快是什么原因| 心口窝疼是什么原因| 口腔异味吃什么药| 李白为什么叫青莲居士| klf是什么意思| 拉肚子拉出血是什么原因| 什么是唐氏儿| 凌晨属于什么时辰| 4月28日是什么星座| 莜面是什么面做的| 13年属什么| 拔完智齿后需要注意什么| 痈是什么| 坐骨神经痛吃什么药快| 铁棍山药和普通山药有什么区别| 为什么会长腋毛| 国老是什么中药| 什么运动最减肥| sakura是什么牌子| 6度醋与9度有什么区别| 什么的海风| 尿路感染有什么症状| 并发症是什么意思| 麦冬是什么| 鞠婧祎什么星座| 脉络膜裂囊肿是什么病| 张牙舞爪是什么生肖| 舒五行属性是什么| 制剂是什么意思| 睾丸发炎吃什么药| 诺如病毒吃什么药最有效| 1974属什么生肖| 什么的向日葵| 云为什么是白色的| 为什么喝酒后会头疼| beam是什么意思| 听之任之是什么意思| 免疫力低会引起什么病| 肺结核是什么症状| 什么的勇气| 齿痕舌是什么原因| 21金维他什么时候吃效果最好| LC是什么| 百度Jump to content

NetBalancer(网络优化软件) V9.9.3.1198官方中文版

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
百度 11月7日,2017年日韩三国记者联合采访活动的第二天,由中、日、韩三国16位媒体记者组成的采访团,走进北京乃至中国北方最富有的村之一昌平区郑各庄,参观村集体企业北京宏福集团,深入了解该村30年来带动区域发展的显著成果与可持续发展新思路。

A structural type system (or property-based type system) is a major class of type systems in which type compatibility and equivalence are determined by the type's actual structure or definition and not by other characteristics such as its name or place of declaration. Structural systems are used to determine if types are equivalent and whether a type is a subtype of another. It contrasts with nominative systems, where comparisons are based on the names of the types or explicit declarations, and duck typing, in which only the part of the structure accessed at runtime is checked for compatibility.

Description

In structural typing, an element is considered to be compatible with another if, for each feature within the second element's type, a corresponding and identical feature exists in the first element's type. Some languages may differ on the details, such as whether the features must match in name. This definition is not symmetric, and includes subtype compatibility. Two types are considered to be identical if each is compatible with the other.

For example, OCaml uses structural typing on methods for compatibility of object types. Go uses structural typing on methods to determine compatibility of a type with an interface. C++ template functions exhibit structural typing on type arguments. Haxe uses structural typing, but classes are not structurally subtyped.

In languages which support subtype polymorphism, a similar dichotomy can be formed based on how the subtype relationship is defined. One type is a subtype of another if and only if it contains all the features of the base type, or subtypes thereof. The subtype may contain added features, such as members not present in the base type, or stronger invariants.

A distinction exists between structural substitution for inferred and non-inferred polymorphism. Some languages, such as Haskell, do not substitute structurally in the case where an expected type is declared (i.e., not inferred), e.g., only substitute for functions that are signature-based polymorphic via type inference.[1] Then it is not possible to accidentally subtype a non-inferred type, although it may still be possible to provide an explicit conversion to a non-inferred type, which is invoked implicitly.

Structural subtyping is arguably more flexible than nominative subtyping, as it permits the creation of ad hoc types and protocols; in particular, it permits creation of a type which is a supertype of an existing type, without modifying the definition of the latter. However, this may not be desirable where the programmer wishes to create closed abstractions.

A pitfall of structural typing versus nominative typing is that two separately defined types intended for different purposes, but accidentally holding the same properties (e.g. both composed of a pair of integers), could be considered the same type by the type system, simply because they happen to have identical structure. One way this can be avoided is by creating one algebraic data type for each use.

In 1990, Cook, et al., proved that inheritance is not subtyping in structurally-typed OO languages.[2]

Checking that two types are compatible, based on structural typing, is a non-trivial operation, e.g., requires maintaining a stack of previous checked types.[3]

When a type does not match the expected structure, error messages are longer than with nominal typing.

Example

Objects in OCaml are structurally typed by the names and types of their methods.

Objects can be created directly (immediate objects) without going through a nominative class. Classes only serve as functions for creating objects.

 # let x =
     object
       val mutable x = 5
       method get_x = x
       method set_x y = x <- y
     end;;
 val x : < get_x : int; set_x : int -> unit > = <obj>

Here the OCaml interactive runtime prints out the inferred type of the object for convenience. Its type (< get_x : int; set_x : int -> unit >) is defined only by its methods. In other words, the type of x is defined by the method types "get_x : int" and "set_x : int -> unit" rather than by any name.[4]

To define another object, which has the same methods and types of methods:

 # let y =
     object
       method get_x = 2
       method set_x y = Printf.printf "%d\n" y
     end;;
 val y : < get_x : int; set_x : int -> unit > = <obj>

OCaml considers them the same type. For example, the equality operator is typed to only take two values of the same type:

 # x = y;;
 - : bool = false

So they must be the same type, or else this wouldn't even type-check. This shows that equivalence of types is structural.

One can define a function that invokes a method:

 # let set_to_10 a = a#set_x 10;;
 val set_to_10 : < set_x : int -> 'a; .. > -> 'a = <fun>

The inferred type for the first argument (< set_x : int -> 'a; .. >) is interesting. The .. means that the first argument can be any object which has a "set_x" method, which takes an int as argument.

So it can be used on object x:

 # set_to_10 x;;
 - : unit = ()

Another object can be made that happens to have that method and method type; the other methods are irrelevant:

 # let z =
     object
       method blahblah = 2.5
       method set_x y = Printf.printf "%d\n" y
     end;;
 val z : < blahblah : float; set_x : int -> unit > = <obj>

The "set_to_10" function also works on it:

 # set_to_10 z;;
 10
 - : unit = ()

This shows that compatibility for things like method invocation is determined by structure.

Let us define a type synonym for objects with only a "get_x" method and no other methods:

 # type simpler_obj = < get_x : int >;;
 type simpler_obj = < get_x : int >

The object x is not of this type; but structurally, x is of a subtype of this type, since x contains a superset of its methods. So x can be coerced to this type:

 # (x :> simpler_obj);;
 - : simpler_obj = <obj>
 # (x :> simpler_obj)#get_x;;
 - : int = 10

But not object z, because it is not a structural subtype:

# (z :> simpler_obj);;
This expression cannot be coerced to type simpler_obj = < get_x : int >;
it has type < blahblah : float; set_x : int -> unit > but is here used with type
  < get_x : int; .. >
The first object type has no method get_x

This shows that compatibility for widening coercions are structural.

References

  1. ^ "Signature-based polymorphism".
  2. ^ Cook, W.R.; Hill, W.L.; Canning, P.S. (January 1990). "Inheritance is not subtyping". Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '90. San Francisco, California. pp. 125–135. doi:10.1145/96709.96721. ISBN 978-0897913430. S2CID 8225906.{{cite book}}: CS1 maint: location missing publisher (link)
  3. ^ "Type compatibility: name vs structural equivalence".
  4. ^ "Object types".
尕尕是什么意思 登字五行属什么 满月回娘家有什么讲究 绝经后子宫内膜增厚是什么原因 乳酸阈值是什么意思
天秤座什么性格 咖啡色配什么颜色好看 鼻窦在什么位置图片 背锅侠是什么意思 什么是乌龙茶
肾结石有什么症状 胡萝卜和什么榨汁好喝 补钾用什么药 学生早餐吃什么方便又营养 腮腺炎什么症状
苏州机场叫什么名字 鼻涕有血丝是什么原因 文化传媒是干什么的 减肥吃什么 两毛四是什么军衔
正司级是什么级别hcv8jop0ns8r.cn 什么网站可以看黄色视频hcv8jop8ns7r.cn 盲点是什么意思jingluanji.com 韭菜吃多了有什么坏处hcv9jop6ns9r.cn 女人怕冷是什么原因hcv8jop6ns8r.cn
什么的时间hcv8jop3ns5r.cn 女性私下有苦味主要是什么原因hcv7jop9ns5r.cn 活动性胃炎是什么意思hcv8jop5ns7r.cn 来月经为什么会拉肚子hcv8jop7ns8r.cn 什么叫耳石症hcv7jop9ns1r.cn
为什么叫水浒传hcv7jop6ns0r.cn pa是什么单位mmeoe.com 剖腹产什么时候可以洗澡hcv9jop6ns2r.cn 高危妊娠是什么意思啊hcv8jop1ns7r.cn 老人家脚肿是什么原因引起的hcv8jop1ns3r.cn
布病吃什么药hcv9jop4ns9r.cn 大将军衔相当于什么官hcv9jop3ns2r.cn 皮肤松弛是什么原因造成的hcv9jop8ns2r.cn 八月三日是什么星座0297y7.com 正常人尿液是什么颜色hcv8jop8ns7r.cn
百度