左耳朵痒代表什么预兆| 看到黄鼠狼什么预兆| 妆前乳是什么| 春秋是一部什么体史书| 萱五行属什么| 11月23日是什么星座| 丈二和尚摸不着头脑是什么意思| 什么血型的人招蚊子| 兵不血刃的意思是什么| 光动能手表是什么意思| 压迫是什么意思| 右肺中叶索条什么意思| 喝什么茶能降低血糖| 乳环是什么| 混圈是什么意思| 撇清关系是什么意思| 南瓜皮可以吃吗有什么作用| 打嗝挂什么科| 女人细菌感染什么原因引起的| hpv弱阳性是什么意思| 拉水便吃什么药| nc是什么意思| 孕妇能吃什么水果| 与五行属什么| 生肖是什么意思| 今天吃什么菜好呢| 篓子是什么意思| 短裙配什么鞋子好看| 为什么冰箱冷藏室会结冰| 杏仁有什么功效| 什么是鼻息肉| 处女什么意思| 为什么短信验证码收不到| 头晕呕吐是什么原因引起的| 九月28号是什么星座| 德国高速为什么不限速| 宇宙的外面是什么| 崖柏对人体有什么好处| 卵巢低回声是什么意思| 乳腺瘤不能吃什么| 点背是什么意思| 肝肾两虚吃什么中成药| 男性感染支原体有什么症状| 子不孝父之过下一句是什么| aosc医学是什么意思| pa是什么材质| 半夜醒是什么原因| 皮肤一块块白是什么病| 处级上面是什么级别| 间奏是什么意思| 铜钱草能治什么病| 美国绿卡有什么好处| 运动后恶心想吐是什么原因| 四十属什么| 闰6月是什么意思| 5月11号是什么星座| 什么样人不能吃海参| g18k金是什么意思| 中国属于什么半球| 高血压注意什么事项| 低gi是什么意思| 男性hpv检查挂什么科| 6月19什么星座| 电磁炉用什么锅最好| 18年是什么年| 面色少华是什么意思| 小孩黑眼圈很重是什么原因| 低血钾有什么症状| 阴道吹气是什么原因| 39年属什么生肖| 白带是什么意思| 姑姑和我是什么关系| 头晕呕吐是什么原因引起的| 黑指甲是什么症状图片| 蝎子长什么样| 梦见蛇预示着什么| 嘴干是什么病的征兆| 疙瘩疤痕有什么方法可以去除| 乳腺增生乳腺结节吃什么药| 成人男性尿床是什么原因造成的| 纵隔是什么意思| 更年期综合症吃什么药| 刘五行属什么| 三班两倒是什么意思| 掉头发吃什么| 3月31号什么星座| 脊髓病变是什么病| 引产是什么意思| singing是什么意思| 白带异味是什么原因| 手经常发麻是什么原因| 黑今读什么| 荠菜什么时候播种最好| 蓝色配什么裤子| 贡生相当于现在的什么| 知了有什么功效与作用| 髋关节弹响是什么原因| 亓是什么意思| rpr阴性是什么意思| 什么是生化流产| 呼吸胸口疼是什么原因| 秦始皇的名字叫什么| 樱桃有什么营养| 白酒不能和什么一起吃| 脚气长什么样| 入职offer是什么意思| 吃什么补雌激素最快| 高血糖主食吃什么好| 梦到水是什么意思| 什么散步填词语| 心机血缺血是什么症状| 左眉毛跳是什么预兆| 四大发明有什么| medium什么意思| 赵本山什么学历| 飞蛾为什么会扑火| 夏至吃什么| 和什么相什么| 高血压是什么| 血常规wbc是什么意思| 小猫踩奶是什么意思| gpr是什么意思| 老赖什么意思| 疖子是什么| 两边太阳胀痛什么原因引起的| 彩棉是什么面料| 什么的足球| 大连机场叫什么| 凌晨十二点是什么时辰| 二月初五是什么星座| 解酒吃什么| 涉三什么意思| 什么叫静脉曲张| gc什么意思| 来源朋友验证消息是什么意思| 劝酒什么意思| 胸部b超挂什么科| 24节气分别是什么| 女性性冷淡是什么原因| 疾苦的疾是什么意思| o发什么音| 千与千寻是什么意思| 什么原因得疱疹| 贼眉鼠眼是什么生肖| 喉咙痛去药店买什么药| 孕妇吸二手烟对胎儿有什么影响| 茵陈是什么| 喝红糖水有什么好处| 5月4日是什么星座| 927什么星座| 百香果和什么不能一起吃| 黄昏是什么时候| 身体乳有什么用| 外卖吃什么| hold住是什么意思| 嘴苦吃什么药| 每个月月经都推迟是什么原因| 月经结束一周后又出血是什么原因| 61岁属什么| 晚上口苦是什么原因引起的| 什么叫方差| s 是什么意思| 海灵菇是什么东西| 6月26什么星座| 吃什么可以来月经最快最有效| 最机灵的动物是什么生肖| 肝纤维化是什么意思| 小便多是什么原因| 什么是spa| 兴渠是什么菜| 西安香烟有什么牌子| samedelman是什么牌子| 阳虚吃什么药效果最好| 产后42天复查挂什么科| 减肥期间可以吃什么| 腮腺炎不能吃什么| 肺结节看什么科| 贫乳是什么意思| 颞下颌紊乱挂什么科| 浅表性胃炎是什么意思| 爽是什么结构| 最新病毒感染什么症状| 梦寐以求是什么意思| 梦到下雨是什么意思| 天秤座女和什么星座最配| 国家的实质是什么| 华字五行属什么| 林子祥属什么生肖| 85属什么| 肌肉痉挛用什么药能治好| 孕妇什么情况下打肝素| 特斯拉发明了什么| 糖尿病人可以吃什么零食| 什么时候最容易受孕| 什么食物蛋白质含量高| 益气是什么意思| 丞五行属什么| 桃花是什么季节开的| 为什么会鬼压床| 胃一阵一阵的疼是什么原因| 印度洋为什么叫印度洋| 心里发慌什么原因| 靠山是什么意思| 欲钱知吃月饼是什么生肖| 耳闷耳堵是什么原因引起的| fan什么意思| 三伏天什么意思| 什么是超七水晶| 现在有什么水果| 异食癖是什么意思| 四月十六是什么星座| 骨折吃什么钙片| 肺纤维化什么意思| 懵是什么意思| 什么的香味| 葱长什么样| 梦见蛇是什么预兆| 干呕是什么病的前兆| 什么是红斑狼疮病| 外阴瘙痒用什么药膏好| 疱疹不能吃什么| 埃及人是什么人种| 睡觉憋气是什么原因引起的| 脑供血不足检查什么项目| 智齿是什么| 耳呜吃什么药最好| 血压低什么原因| 吃什么才能长胖| 支原体感染是什么症状| 食管裂孔疝是什么意思| 结账是什么意思| 丑时是什么时候| 舌头两边锯齿状是什么原因| 乳核是什么| 无水酥油是什么| 什么是有机物什么是无机物| 月经前乳房胀痛是什么原因| 唐僧代表什么生肖| 尿结石什么症状| 间羟胺又叫什么| 痞是什么意思| 蛇喜欢吃什么食物| 2021年是什么生肖| 2015年是什么生肖| 沧海桑田什么意思| 中国四大发明是什么| 喝羊奶有什么好处| 你的生命有什么可能| 生意兴隆是什么生肖| 菽是什么意思| 尿潜血挂什么科| 爆粗口是什么意思| kitty什么意思| 什么好像什么| 红点是什么原因引起的| 挂号是什么意思| 8023什么意思| 欣欣向荣是什么意思| 屁股疼挂什么科室| 注意身体是什么意思| 手筋鼓起来是什么原因| 胸部中间痛什么原因引起的| 又是什么意思| 免疫力低吃什么补| 百度Jump to content

辽宁丰迪发动机进气系统有限公司节后复工忙生产

From Wikipedia, the free encyclopedia
百度 经莲湖乡党委研究,决定给予王典取同志党内严重警告处分,并责令王典取等三人退出选举。

Uniform function call syntax (UFCS) or uniform call syntax (UCS) or sometimes universal function call syntax is a programming language feature in D,[1] Nim,[2] Koka,[3] and Effekt[4] that allows any function to be called using the syntax for method calls (as in object-oriented programming), by using the receiver as the first parameter and the given arguments as the remaining parameters.[5] The same technique is used in the AviSynth scripting language under the name "OOP notation".[6]

UFCS is particularly useful when function calls are chained[1] (behaving similar to pipes, or the various dedicated operators available in functional languages for passing values through a series of expressions). It allows free functions to fill a role similar to extension methods in some other languages. Another benefit of the syntax is related to completion systems in IDEs, which use type information to show a list of available functions, dependent on the context. When the programmer starts with an argument, the set of potentially applicable functions is greatly narrowed down,[7] aiding discoverability.

Examples

[edit]

D programming language

[edit]
int first(int[] arr)
{
    return arr[0];
}

int[] addone(int[] arr)
{
    int[] result;
    foreach (value; arr) {
        result ~= value + 1;
    }
    return result;
}

void main()
{
    auto a = [0, 1, 2, 3];

    // all the following are correct and equivalent
    int b = first(a);
    int c = a.first;

    // chaining
    int[] e = a.addone().addone();
}

Nim programming language

[edit]
type Vector = tuple[x, y: int]

proc add(a, b: Vector): Vector =
  (a.x + b.x, a.y + b.y)

let
  v1 = (x: -1, y: 4)
  v2 = (x: 5, y: -2)

  # all the following are correct
  v3 = add(v1, v2)
  v4 = v1.add(v2)
  v5 = v1.add(v2).add(v4)

C++ proposal

[edit]

Proposals for a unification of member function and free function calling syntax have been discussed from the early years of C++ standardization. Glassborow (2004) proposed a uniform calling syntax (UCS), allowing specially annotated free functions to be called with member function notation.[8] In 2016 it was proposed a second time for addition to C++ by Bjarne Stroustrup[9] and Herb Sutter,[7] to reduce the ambiguous decision between writing free functions and member functions, to simplify the writing of templated code. Many programmers are tempted to write member functions to get the benefits of the member function syntax (e.g. "dot-autocomplete" to list member functions);[10] however, this leads to excessive coupling between classes.[11] This was again, in 2023, proposed by Herb Sutter[12] claiming new information and insights, as well as an experimental implementation in the cppfront compiler.

Rust usage of the term

[edit]

Until 2018, it was common[13] to use this term when actually referring to qualified/explicit path syntax and most commonly the fully qualified path syntax: because it is possible to have several traits defining the same method implemented on the same struct, a mechanism is needed to disambiguate which trait should be used. Member functions can also be used as free functions through a qualified (namespaced) path. The term UFCS is incorrect for these uses, as it allows using methods as (namespaced) free functions, but not using free functions as methods.

See also

[edit]

References

[edit]
  1. ^ a b "Universal Function Call Syntax (UFCS)". Programming in D. Retrieved 1 October 2017.
  2. ^ "Nim by Example - Procs". nim-by-example.github.io. Retrieved 2025-08-05.
  3. ^ "The Koka Programming Language". koka-lang.github.io. Retrieved 2025-08-05.
  4. ^ "Functions". Effekt Language. Retrieved 2025-08-05.
  5. ^ "Functions". D Programming Language. Retrieved 1 October 2017.
  6. ^ "Operators". Avisynth wiki. a.function(b) is equivalent to function(a, b)
  7. ^ a b "Unified Call Syntax" (PDF). Isocpp.org. Retrieved 1 October 2017.
  8. ^ Francis Glassborow (2 May 2004). "N1585: Uniform Calling Syntax (Re-opening public interfaces)" (PDF). Retrieved 17 December 2018.
  9. ^ "UFCS proposal" (PDF). Open-std.org. Retrieved 1 October 2017.
  10. ^ "Using IntelliSense". MSDN. Retrieved 1 October 2017.
  11. ^ "How Non-Member Functions Improve Encapsulation". Drdobbs.com. Retrieved 1 October 2017.
  12. ^ Sutter, Herb (13 October 2023). "Unified function call syntax (UFCS)" (PDF).
  13. ^ "Rename UFCS to accurately reflect its functionality. · Issue #1140 · rust-lang/rfcs". GitHub. Retrieved 2025-08-05.
什么叫腺瘤 出海什么意思 孩子鼻子出血什么原因造成的 什么是聚酯纤维 2018年属什么
蜜蜂的天敌是什么 欧莱雅适合什么年龄 低烧是什么病的前兆 相刑什么意思 高血压吃什么水果好
省长是什么级别干部 梦见什么是怀孕的征兆 bug什么意思 梦见筷子是什么预兆 经常拉肚子是什么原因引起的
为什么同房后小腹隐隐作痛 孩子睡觉咬牙齿是什么原因引起的 83年属什么 口腔检查挂什么科 白血病有什么征兆
离是什么生肖dayuxmw.com rh血型是什么血型hcv7jop9ns8r.cn 心肌桥是什么病hanqikai.com 义结金兰是什么意思hcv7jop7ns2r.cn 头总是昏昏沉沉的是什么原因hcv9jop2ns2r.cn
电脑什么牌子好hcv9jop8ns3r.cn 蜱虫长什么样hcv8jop8ns2r.cn 多尔衮是什么意思travellingsim.com 专升本有什么专业hcv9jop2ns8r.cn 苹果充电口叫什么hcv9jop4ns0r.cn
身上老出汗是什么原因引起的hcv8jop8ns8r.cn 石榴花是什么颜色hcv8jop1ns7r.cn pretty什么意思hcv9jop3ns6r.cn 如日中天的意思是什么hcv8jop2ns8r.cn 胃不好吃什么最养胃hcv8jop8ns9r.cn
胃反酸什么原因hcv8jop8ns8r.cn 吃鸭蛋有什么好处和坏处hcv9jop8ns1r.cn 荆棘是什么植物hcv8jop6ns6r.cn 疱疹吃什么药可以根治xjhesheng.com 胃火牙疼吃什么药好hcv9jop5ns3r.cn
百度