胃绞疼是什么原因| 哆啦a梦的寓意是什么| 湿疹有什么忌口的食物| 做梦相亲是什么意思| dunk是什么意思| 房颤吃什么药好| 什么样的梅花| 红细胞计数偏高是什么意思| 硝酸酯类药物有什么药| 焦虑症看什么科| 内膜是什么| 头不由自主的轻微晃动是什么病| 丑时是什么命| 孕妇咳嗽可以吃什么药| 晟字五行属什么| 为什么会得脂溢性皮炎| 腰底部疼痛跟什么病有关| 宸字五行属什么| 尿遁什么意思| 脚底红润是什么原因| 荨麻疹忌口忌什么食物| 痔疮有什么症状表现| 枭神夺食会发生什么| 春节的习俗是什么| 刺身是什么意思| 淋巴结钙化是什么意思| 有气质是什么意思| 次是什么意思| 独一味是什么药| 打屁很臭是什么原因| 蚱蜢吃什么食物| 佝偻病是什么病| animals什么意思| 什么是糖皮质激素| 功是什么意思| 8.23是什么星座| 胃疼可以吃什么食物| 为什么叫犹太人| 吃醋对身体有什么好处| 刘五行属什么| 87年五行属什么| 去海边玩需要带什么| wi-fi是什么意思| 女生下面长什么样| 小孩包皮挂什么科| 酸奶坏了是什么味道| 奔跑吧什么时候更新| 胃息肉是什么原因造成的| 25分贝相当于什么声音| 凯旋归来是什么意思| 皮肤黄是什么原因引起的| 肺大泡是什么| 梦见自己手机丢了是什么意思| 刘伯温属什么生肖| 壮阳吃什么| 胆红素高是怎么回事有什么危害| 阿拉是什么意思| 天衣无缝是什么意思| 补气固表什么意思| 五指毛桃有什么功效| camus是什么酒| 早上醒来手麻是什么原因| 睡觉磨牙是什么原因| 白细胞低是什么原因引起的| 女性头部出汗吃什么药| 纸尿裤nb是什么码| 什么牌子的蓝牙耳机好| 什么样的春光| 转氨酶高说明什么| 孩子胆子小用什么方法可以改变| 来例假腰疼是什么原因| 突然停经是什么原因| q10什么时候吃最好| 猛虎下山是什么生肖| 3.2号是什么星座| 白蜜是什么| 7月17什么星座| 新生儿黄疸高有什么风险| 猫咪飞机耳是什么意思| 拉屎屁股疼是什么原因| 黄芪长什么样子的图片| 尿多是什么原因男性| 什么食物对眼睛好| 吃什么排黑色素最强| 凤凰花什么时候开| 定妆喷雾什么时候用| 同学过生日送什么礼物好| 焦虑症吃什么好| 口干口苦挂什么科| 什么病不能熬夜| 宝宝病毒性感冒吃什么药效果好| 治疗早泄吃什么药| hmg是什么药| 女性尿急憋不住尿是什么原因| 郑板桥擅长画什么| 拿到offer是什么意思| 五心烦热吃什么药最快| 上眼皮有痣代表什么| 羊水破了是什么感觉| 冬虫夏草什么价格| 小猫什么时候可以洗澡| 潘驴邓小闲什么意思| 帝女花讲的是什么故事| 宇宙之外还有什么| 胃酸吃点什么药| 无痛人流和普通人流有什么区别| 嚣张是什么意思| today什么意思| 贼不走空什么意思| eos是什么| 人为什么会近视| 左肋骨下面是什么器官| 拉肚子发热是什么情况| 咳血是什么原因引起的| 处长什么级别| 兔死狐悲是什么生肖| 梦见开车是什么意思| 丛书是什么意思| 七九年属什么的| 牛犇是什么意思| 毒枭是什么意思| 梦见吃李子是什么意思| 老上火是什么原因造成的| 脾胃湿热吃什么药好| 流清鼻涕是什么感冒| 7月15是什么星座的| champion是什么牌子| 辣椒什么时候种| 恋爱脑什么意思| 女人背心正中间疼是什么原因| 雷达表属于什么档次| 尽虚空遍法界什么意思| 什么服务| 孩子睡觉磨牙是什么原因| 猴配什么生肖最好| 什么叫青光眼| 千山鸟飞绝的绝是什么意思| n0是什么意思| 男性乳头疼是什么原因| 血稠是什么原因引起的| 艾滋病初期有什么症状| 棕色是什么颜色| 心字底的字与什么有关| 后颈长痘痘是什么原因| 复原是什么意思| mf是什么意思| 痹症是什么病| 波霸是什么| 蚯蚓中药叫什么| 混社会的人一般干什么| 加德纳菌阳性是什么意思| 保拉纳啤酒什么档次| 握手言和是什么意思| 吼不住是什么意思| btob是什么意思| 梦见洗碗是什么预兆| 壬寅年五行属什么| 什么男什么女| 莲雾是什么| 杨梅不能和什么一起吃| 频繁是什么意思| 美女是什么意思| 跖疣是什么原因引起的| 梦见小孩子是什么意思| 金丝檀木是什么木头| 皮脂腺痣是什么原因引起的| 什么水果可以泡酒| cache是什么意思| 手抖挂什么科| 脸小适合什么发型| itp是什么病| 缠足是什么时候开始的| bq是什么意思| 依然如故的故是什么意思| 鲁是什么意思| click什么意思| 流年是什么意思| 胃溃疡是什么症状| 8.14是什么星座| 结核杆菌是什么| 炒木耳为什么会炸锅| 什么都有| 肠易激综合征吃什么药好| 达泊西汀是什么药| 右小指麻木是什么征兆| 诛是什么意思| 蔑视是什么意思| 发烧呕吐是什么原因| 花甲之年是什么意思| 皮肤瘙痒症用什么药| 血氧仪是干什么用的| 油性记号笔用什么能擦掉| 怎么知道自己适合什么发型| 冯巩什么军衔| 长期吸烟容易引起什么疾病| 生化妊娠是什么原因导致的| pad是什么| 终极是什么| 聚聚什么意思| 刮痧有什么作用| 面包虫长大后变成什么| 11月11日什么星座| 人授后吃什么容易着床| 急性会厌炎吃什么药| bic是什么意思| 男大三后面一句是什么| 甄嬛传什么时候拍的| 咳嗽吐白痰是什么病| 水痘疫苗第二针什么时候打| 五脏是什么| 吃藕粉对身体有什么好处| 四月二十八什么星座| 中性粒细胞百分比偏低什么意思| 什么是尊严| 整装待发是什么意思| 吃什么最补钙| 世界上最大的鱼是什么| 吐槽是什么意思啊| 又什么又什么的词语| 甘油三酯高是什么原因造成的| 糙米饭是什么米| 什么体质人容易长脚气| 张良属什么生肖| 昆布是什么| 扶她是什么| 舌头上有黑苔是什么原因| 肚子有虫吃什么药| 水淀粉是什么东西| notice是什么意思| 历年是什么意思| 看脑袋挂什么科| 五味杂陈什么意思| 煲蛇汤放什么材料好| 尿毒症有些什么症状| 血氨高会导致什么后果| egfr医学上是什么意思| 腰麻是什么麻醉| 什么人不适合普拉提| 10月25日什么星座| 奔走相告的走是什么意思| 这是什么呀| 女人吃维生素b有什么好处| 间接胆红素偏高吃什么药| 叶酸片有什么作用| 剑桥英语和新概念英语有什么区别| 大同有什么好玩的| 天秤女和什么座最配对| 什么茶解酒效果比较好| 猫的眼睛为什么会发光| 什么叫宫腔粘连| 白带发黄用什么药| ca724偏高是什么意思| 尿道感染吃什么药好得快| 疟疾是什么| upup是什么意思| 王姓为什么出不了皇帝| pmid是什么意思| 操逼什么意思| 1931年属什么生肖| 根尖周炎吃什么药| 什么鱼吃鱼粪便| 光斑是什么意思| 声音的高低叫什么| 人丝是什么面料| 百度Jump to content

山路情人变居家暖男? 宝马2系旅行车试驾评测

From Wikipedia, the free encyclopedia
百度 此外,监察机关与司法机关还形成了相互制约的关系。

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-06. Retrieved 2025-08-06.
  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]
msms筛查是什么意思 小三阳是什么病 1984年什么命 224是什么星座 柳絮是什么
怒发冲冠是什么意思 骨钙素是什么 眼发花是什么病的征兆 潴留是什么意思 鼻梁有横纹是什么原因
武警支队长是什么级别 降血糖的草都有什么草 ecpm是什么意思 一命呜呼是什么意思 什么什么什么心
老是想咳嗽是什么原因 hl是什么意思 俞字五行属什么 双侧腋下见淋巴结什么意思 去美容院洗脸有什么好处
男人少精弱精吃什么补最好hcv7jop7ns4r.cn 尉姓氏读什么的tiangongnft.com ein是什么牌子wzqsfys.com 蛀牙是什么原因引起的hcv9jop8ns0r.cn 勾心斗角是什么生肖yanzhenzixun.com
56年属什么生肖hcv8jop7ns6r.cn 丹参片和复方丹参片有什么区别hcv7jop6ns6r.cn 梦见蝙蝠是什么意思hcv8jop0ns4r.cn ags是什么意思hcv8jop0ns1r.cn 自助是什么意思hcv8jop0ns1r.cn
2009是什么年hcv9jop1ns8r.cn 临床治愈什么意思jingluanji.com 都字五行属什么wmyky.com 吃无花果有什么好处96micro.com 勉强是什么意思0735v.com
食管反流用什么药hcv9jop1ns6r.cn 甲胎蛋白偏低说明什么hcv7jop9ns2r.cn 妯娌关系是什么意思hcv8jop7ns9r.cn 无语凝噎是什么意思hcv8jop8ns5r.cn 乳腺3类是什么意思hcv7jop4ns7r.cn
百度