南瓜子吃多了有什么副作用| 喝什么茶可以降血脂| phonics是什么意思| 眼睛痛是什么原因| 肾积水有什么危害| 脐橙什么意思| 保肝降酶药首选什么药| 什么是造影检查| 氯雷他定片是什么药| 跑步腰疼是什么原因| 胃老是恶心想吐是什么原因| 小乌龟吃什么| 大便颜色发黑是什么原因| 微米是什么单位| 火星是什么颜色| 宝鸡以前叫什么| 什么人适合学玄学| 孕妇什么时候吃dha效果比较好| 大肠杆菌是什么意思| 男性下焦湿热吃什么药| 酸性体质是什么意思| 保守治疗是什么意思| 为什么出汗有酸臭味| bae什么意思| 你想成为什么样的人| 什么是末法时代| 为什么会得偏头痛| 制动是什么意思| 经警是做什么的| 胎儿左肾盂分离是什么意思| 用你的手解我的锁是什么歌| 义务兵是什么意思| 胃炎吃什么药效果最好| 毛豆有什么营养价值| 暂住证办理需要什么材料| 得了破伤风是什么症状| 损伤是什么意思| 新发展理念是什么| 白头发吃什么维生素| 感冒为什么会流眼泪| 脑膜炎是什么| 5月15日是什么星座| 手绘是什么意思| 10月1日是什么日子| 追溯码是什么意思| 47岁属什么| 护照类型p是什么意思| 拔罐有什么作用和功效| 男模是什么| 143是什么意思| 2024年属什么| 尿道口下裂是什么样子| 手指甲有黑色条纹是什么原因| 2013属什么生肖| 六月初六是什么节| 桃花灼灼什么意思| 偏执什么意思| 犬瘟吃什么药管用| 什么情况下要做宫腔镜| 肾虚吃什么东西补得快| 大小休是什么意思| 口犬读什么| 眼睛屈光不正什么意思| 乳房胀痛什么原因| 拔罐有什么作用和功效| 眼睛视力模糊用什么眼药水| 栀子花什么时候开| 早起的鸟儿有虫吃是什么意思| 血糖高喝酒有什么影响| 穷字代表什么生肖| 三白眼是什么意思| DHL是什么| 做体检挂什么科| 莱猪是什么| 吃杏仁有什么好处| 金针菇不能和什么一起吃| 月经期生气会造成什么后果| 北极有什么动物| 心肌缺血吃什么| ad什么时候吃最好| 阿尔山在内蒙古什么地方| 快递客服主要做什么| 病逝是什么意思| 人为什么需要诗歌| 月经期间吃什么对身体好| 二月份出生的是什么星座| 记忆力差吃什么药| 咳嗽吃什么药好| 什么命要承受丧子之痛| 皮肤黄适合穿什么颜色的衣服| 女人湿气重吃什么药效果好| 肌肉拉伤挂什么科| 腿脚肿胀是什么原因引起的| 牙疼不能吃什么| tdi是什么意思| 理想是什么意思| 去医院打耳洞挂什么科| 梦见火灾预示什么| 玮是什么意思| 画代表什么生肖| 秦皇岛有什么特色美食| 甲状腺过氧化物酶抗体高说明什么| 什么是精神出轨| 琳五行属什么| 用进废退什么意思| 尼哥是什么意思| 查血常规挂什么科| 确立是什么意思| 乳腺结节吃什么散结快| 提前来大姨妈是什么原因| 什么是穿刺检查| 乳腺结节吃什么好| 肥皂剧是什么| 银耳为什么助湿气| 豆浆什么人不能喝| 铁瓷是什么意思| 蛋白粉什么时候吃最好| 上呼吸道感染吃什么| 特种兵是什么兵种| 椰子水有什么功效| 来月经同房有什么影响| 蓝精灵是什么药| 吃什么能让肠道蠕动快| 世界上最毒的蜘蛛叫什么| 唯女子与小人难养也什么意思| 除外是什么意思| 钠尿肽高是什么原因| ak是什么意思| 马弁是什么意思| 美育是什么| 总放屁是什么病的前兆| 总胆红素偏高什么意思| 精满自溢是什么意思| 中国是什么时区| 双生什么意思| 脖子变粗了是什么原因| 病人化疗期间吃什么好| 梅毒用什么药| 浮萍是什么意思| 为什么肚子越来越大| 一个月一个泉是什么字| quilt什么意思| 菠萝为什么要用盐水泡| 磁场是什么| 清福是什么意思| 中核集团是什么级别| 颐养天年是什么意思| 输卵管囊肿是什么原因引起的| 鱼爱吃什么食物| 睡觉中途总醒什么原因| 淋巴结转移是什么意思| 五十肩是什么意思| 荨麻疹长什么样图片| 什么哈欠| 房颤吃什么药效果最好| 难为情是什么意思| 女人肝胆湿热吃什么药| 脚水肿吃什么药| 吃什么水果退烧| coscia是什么品牌| 在什么的前面用英语怎么说| 什么的阳光| 中国的国菜是什么| ami是什么意思| 2017属什么| gmp是什么意思| 毒唯什么意思| 脚麻木吃什么药| 肌底液是干什么用的| 湿气重吃什么药最有效| 什么的照射| 黄瓜有什么营养| 唾液是什么| 三叉神经痛吃什么药| 拍胸片挂什么科| 梦见长白头发是什么意思| 根是什么| gas什么意思| 安赛蜜是什么| 百分点是什么意思| 芒果什么人不适合吃| 什么云霄| 什么叫玄学| 飞机杯什么感觉| 什么人不能吃蜂蜜| 为所当为什么意思| 飞机选座位什么位置好| 虾不能和什么水果一起吃| 顺子是什么意思| 男人占有欲强说明什么| 吃苹果有什么好处和功效| 野字五行属什么| 做什么好赚钱| 消化不良的症状吃什么药| 羊水破了什么感觉| 5.3什么星座| 止血敏又叫什么| 什么是接触性出血| ghost是什么意思| 彻夜难眠什么意思| 古代天花是现代什么病| 睡眠质量差吃什么药| 巨蟹座和什么星座最配| 异常是什么意思| 1964年是什么命| 茵陈是什么| 高血糖可以吃什么| 朱砂是什么| 脸上长癣是什么原因造成的| 第一次坐飞机注意什么| 鼻梁歪的男人说明什么| 而已是什么意思| 晚上睡觉多梦是什么原因| 妄想什么意思| 水柔棉是什么面料| 发配是什么意思| 瑞字属于五行属什么| 非你不可什么意思| 医保自费是什么意思| 阑尾在什么位置| 肠道菌群失调吃什么药| 私联是什么意思| 牙龈无缘无故出血是什么原因| ml是什么单位| 鸡心为什么不建议吃| 左侧肋骨疼是什么原因| 11月22是什么星座| 人乳头瘤病毒33型阳性是什么意思| 金碧辉煌是什么生肖| 阔以是什么意思| 朋友圈提到了我是什么意思| 糗大了是什么意思| 拉肚子挂什么科| 梦见女儿结婚是什么意思| 阳痿是什么原因引起的| mra是什么意思| 挚友是什么意思| 什么是西米| 奔跑吧 什么时候开播| 莞尔一笑什么意思| 黑皮肤适合穿什么颜色的衣服| 云母是什么东西| 手为什么会发麻| 最大的沙漠是什么| 臭虫最怕什么| 拉肚子吃什么| 带状疱疹用什么药| 7d是什么意思| 荆条是什么意思| 铁皮石斛适合什么人吃| 销魂什么意思| 榴莲跟什么不能一起吃| 喝了藿香正气水不能吃什么| 博士的学位是什么| 什么鱼不能吃脑筋急转弯| 漫展是干什么的| 忆苦思甜下一句是什么| 锁钥是什么意思| 芈月传芈姝结局是什么| rca是什么意思| 乐高是什么| 盆腔炎用什么药最好| 幽门螺杆菌是一种什么病| 高炮是什么| 百度

走进海拔5000多米的消防大队 他们有一项特殊的任务

百度   新华网还将发挥自身优势,借助有影响力、传播力和公信力的全媒体信息发布平台,弘扬倡导诚信理念,揭露净水器行业不良现象,促进消费环境健康发展。

Modular programming is a software development mindset that emphasizes organizing the functions of a codebase into independent modules – each providing an aspect of a computer program in its entirety without providing other aspects.

A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are detectable by other modules. The implementation contains the working code that corresponds to the elements declared in the interface. Modular programming is closely related to structured programming and object-oriented programming, all having the same goal of facilitating construction of large software programs and systems by decomposition into smaller pieces, and all originating around the 1960s. While the historic use of these terms has been inconsistent, modular programming now refers to the high-level decomposition of the code of a whole program into pieces: structured programming to the low-level code use of structured control flow, and object-oriented programming to the data use of objects, a kind of data structure.

In object-oriented programming, the use of interfaces as an architectural pattern to construct modules is known as interface-based programming.[citation needed]

History

edit

Modular programming, in the form of subsystems (particularly for I/O) and software libraries, dates to early software systems, where it was used for code reuse. Modular programming per se, with a goal of modularity, developed in the late 1960s and 1970s, as a larger-scale analog of the concept of structured programming (1960s). The term "modular programming" dates at least to the National Symposium on Modular Programming, organized at the Information and Systems Institute in July 1968 by Larry Constantine; other key concepts were information hiding (1972) and separation of concerns (SoC, 1974).

Modules were not included in the original specification for ALGOL 68 (1968), but were included as extensions in early implementations, ALGOL 68-R (1970) and ALGOL 68C (1970), and later formalized.[1] One of the first languages designed from the start for modular programming was the short-lived Modula (1975), by Niklaus Wirth. Another early modular language was Mesa (1970s), by Xerox PARC, and Wirth drew on Mesa as well as the original Modula in its successor, Modula-2 (1978), which influenced later languages, particularly through its successor, Modula-3 (1980s). Modula's use of dot-qualified names, like M.a to refer to object a from module M, coincides with notation to access a field of a record (and similarly for attributes or methods of objects), and is now widespread, seen in C++, C#, Dart, Go, Java, OCaml, and Python, among others. Modular programming became widespread from the 1980s: the original Pascal language (1970) did not include modules, but later versions, notably UCSD Pascal (1978) and Turbo Pascal (1983) included them in the form of "units", as did the Pascal-influenced Ada (1980). The Extended Pascal ISO 10206:1990 standard kept closer to Modula2 in its modular support. Standard ML (1984)[2] has one of the most complete module systems, including functors (parameterized modules) to map between modules.

In the 1980s and 1990s, modular programming was overshadowed by and often conflated with object-oriented programming, particularly due to the popularity of C++ and Java. For example, the C family of languages had support for objects and classes in C++ (originally C with Classes, 1980) and Objective-C (1983), only supporting modules 30 years or more later. Java (1995) supports modules in the form of packages, though the primary unit of code organization is a class. However, Python (1991) prominently used both modules and objects from the start, using modules as the primary unit of code organization and "packages" as a larger-scale unit; and Perl 5 (1994) includes support for both modules and objects, with a vast array of modules being available from CPAN (1993). OCaml (1996) followed ML by supporting modules and functors.

Modular programming is now widespread, and found in virtually all major languages developed since the 1990s. The relative importance of modules varies between languages, and in class-based object-oriented languages there is still overlap and confusion with classes as a unit of organization and encapsulation, but these are both well-established as distinct concepts.

Terminology

edit

The term assembly (as in .NET languages like C#, F#, or Visual Basic (.NET)) or package (as in Dart, Go, or Java) is sometimes used instead of module. In other implementations, these are distinct concepts; in Python a package is a set of modules, while in Java 9 the introduction of the new module concept (a set of packages with enhanced access control) was implemented.

Furthermore, the term "package" has other uses in software (for example .NET NuGet packages). A component is a similar concept, but typically refers to a higher level; a component is a piece of a whole system, while a module is a piece of an individual program. The scale of the term "module" varies significantly between languages; in Python it is very small-scale and each file is a module, while in Java 9 it is planned to be large-scale, where a module is a set of packages, which are in turn sets of files.

Other terms for modules include unit, used in Pascal dialects.

Language support

edit

Languages that formally support the module concept include Ada, ALGOL, BlitzMax, C++, C#, Clojure, COBOL, Common Lisp, D, Dart, eC, Erlang, Elixir, Elm, F, F#, Fortran, Go, Haskell, IBM/360 Assembler, Control Language (CL), IBM RPG, Java, Julia, MATLAB, ML, Modula, Modula-2, Modula-3, Morpho, NEWP, Oberon, Oberon-2, Objective-C, OCaml, several Pascal derivatives (Component Pascal, Object Pascal, Turbo Pascal, UCSD Pascal), Perl, PHP, PL/I, PureBasic, Python, R, Ruby,[3] Rust, JavaScript,[4] Visual Basic (.NET) and WebDNA.

In the Java programming language, the term "package" is used for the analog of modules in the JLS;[5] — see Java package. "Modules", a kind of set of packages, were introduced in Java 9 as part of Project Jigsaw; these were earlier called "superpackages" were planned for Java 7.

Conspicuous examples of languages that lack support for modules are C and have been C++ and Pascal in their original form, C and C++ do, however, allow separate compilation and declarative interfaces to be specified using header files. Modules were added to Objective-C in iOS 7 (2013); to C++ with C++20,[6] and Pascal was superseded by Modula and Oberon, which included modules from the start, and various derivatives that included modules. JavaScript has had native modules since ECMAScript 2015. C++ modules have allowed backwards compatibility with headers (with "header units"). Dialects of C allow for modules, for example Clang supports modules for the C language,[7] though the syntax and semantics of Clang C modules differ from C++ modules significantly.

Modular programming can be performed even where the programming language lacks explicit syntactic features to support named modules, like, for example, in C. This is done by using existing language features, together with, for example, coding conventions, programming idioms and the physical code structure. IBM i also uses modules when programming in the Integrated Language Environment (ILE).

Key aspects

edit

With modular programming, concerns are separated such that modules perform logically discrete functions, interacting through well-defined interfaces. Often modules form a directed acyclic graph (DAG); in this case a cyclic dependency between modules is seen as indicating that these should be a single module. In the case where modules do form a DAG they can be arranged as a hierarchy, where the lowest-level modules are independent, depending on no other modules, and higher-level modules depend on lower-level ones. A particular program or library is a top-level module of its own hierarchy, but can in turn be seen as a lower-level module of a higher-level program, library, or system.

When creating a modular system, instead of creating a monolithic application (where the smallest component is the whole), several smaller modules are written separately so when they are composed together, they construct the executable application program. Typically, these are also compiled separately, via separate compilation, and then linked by a linker. A just-in-time compiler may perform some of this construction "on-the-fly" at run time.

These independent functions are commonly classified as either program control functions or specific task functions. Program control functions are designed to work for one program. Specific task functions are closely prepared to be applicable for various programs.

This makes modular designed systems, if built correctly, far more reusable than a traditional monolithic design, since all (or many) of these modules may then be reused (without change) in other projects. This also facilitates the "breaking down" of projects into several smaller projects. Theoretically, a modularized software project will be more easily assembled by large teams, since no team members are creating the whole system, or even need to know about the system as a whole. They can focus just on the assigned smaller task.

See also

edit

References

edit
  1. ^ Lindsey, Charles H. (Feb 1976). "Proposal for a Modules Facility in ALGOL 68" (PDF). ALGOL Bulletin (39): 20–29. Archived from the original (PDF) on 2025-08-07. Retrieved 2025-08-07.
  2. ^ David MacQueen (August 1984). "Modules for Standard ML". LFP '84 Proceedings of the 1984 ACM Symposium on LISP and functional programming. pp. 198–207. doi:10.1145/800055.802036.
  3. ^ "class Module - Documentation for Ruby 3.5".
  4. ^ ECMAScript? 2015 Language Specification, 15.2 Modules
  5. ^ James Gosling, Bill Joy, Guy Steele, Gilad Bracha, The Java Language Specification, Third Edition, ISBN 0-321-24678-0, 2005. In the Introduction, it is stated "Chapter 7 describes the structure of a program, which is organized into packages similar to the modules of Modula." The word "module" has no special meaning in Java.
  6. ^ "N4720: Working Draft, Extensions to C++ for Modules" (PDF).
  7. ^ "Modules". clang.llvm.org.
edit
拉油便是什么原因 老死不相往来什么意思 锦鲤是什么意思 睡觉容易醒是什么原因 着相什么意思
急性胰腺炎是什么病 退而求其次是什么意思 什么叫三叉神经痛 跃跃欲试什么意思 1943年属羊的是什么命
可尔必思是什么饮料 青蛙喜欢吃什么 桃子与什么相克 非布司他片是什么药 总是放屁是什么原因
细菌感染引起的发烧吃什么药 人为什么会生气 5月29日是什么星座 女人手心痒是什么征兆 十月一日是什么日子
老人身上痒是什么原因1949doufunao.com 糖类抗原199是什么意思hcv9jop1ns9r.cn 破财消灾什么意思hcv7jop9ns2r.cn 内分泌失调什么症状hcv8jop6ns4r.cn 肌层彩色血流星点状是什么意思hcv8jop1ns1r.cn
儿童抗o高会引起什么病hcv8jop8ns3r.cn 手球是什么运动hcv9jop3ns0r.cn 菌丝是什么beikeqingting.com 卸妆用什么最好adwl56.com 牙结石不除有什么危害hcv8jop7ns6r.cn
手麻脚麻吃什么药hcv8jop5ns2r.cn 清白是什么意思hcv8jop9ns9r.cn 口腔溃疡要吃什么药hcv8jop9ns7r.cn 因果循环是什么意思hcv9jop2ns6r.cn 梦到龙预示着什么hcv7jop9ns3r.cn
早餐吃什么最营养baiqunet.com 天气一热身上就痒是什么原因hcv9jop0ns8r.cn 梦见抢银行是什么意思hcv8jop0ns5r.cn 什么情况啊这是hcv9jop3ns0r.cn 不到长城非好汉的下一句是什么hcv9jop6ns0r.cn
百度