敏感是什么意思| 师夷长技以制夷是什么意思| 痛风吃什么菜好| 乌龟不吃食是什么原因| 胃嗳气是什么原因| 牙周炎吃什么药效果好| 魄力是什么意思| 新生儿甲状腺偏高有什么影响| 白色加红色等于什么颜色| 劈腿是什么意思| 梦见自己捡钱是什么意思| 老巫婆是什么意思| 掮客是什么意思| 前列腺是什么原因引起的| 农历七月初七俗称什么| 胸闷气短可能是什么病| 阻生智齿是什么意思| 重孙是什么意思| 挚爱和至爱有什么区别| 93岁属什么生肖| 面部油腻是什么原因| 什么的毛主席| 铜绿假单胞菌用什么抗生素| 嗓子哑是什么原因引起的| 何首乌长什么样| 甘草有什么作用| 胖大海配什么喝治咽炎| 早上起床手指肿胀是什么原因| 人为什么会打哈欠| 扫兴是什么意思| 1月20是什么星座| 胸骨疼挂什么科| 林檎是什么意思| 第一磨牙什么时候换| 睡觉被口水呛醒是什么原因| 乳痈是什么意思| 乳腺点状强回声是什么意思| 发烧酒精擦什么部位| 不care是什么意思| 肾构错瘤要注意什么| acb是什么意思| 寻麻疹不能吃什么| c3c4补体是什么意思| 血脂高有什么症状表现| 梅开二度是什么意思| 高抬贵手是什么意思| 五花肉和什么菜炒好吃| 每日家情思睡昏昏什么意思| 曝光是什么意思| 冬瓜和什么不能一起吃| 两个虎是什么字| 孙子兵法到底说什么| 血药浓度是什么意思| 舌系带长有什么影响吗| 蒸馏水是什么| 总胆汁酸是什么意思| 试孕纸什么时候测最准| 做一半就软了是什么原因| 黄体功能不足吃什么药| 硬不起来是什么原因| 鹿米念什么| 潸然泪下是什么意思| 来姨妈下面疼是为什么| classy是什么意思| 穿什么衣服| 未时属什么生肖| 2001属什么| 银灰色五行属什么| 葡萄糖氯化钠注射作用是什么| 结局he是什么意思| 为什么会脚臭| 入木三分是什么意思| 普瑞巴林是什么药| 霍光和卫子夫什么关系| 头皮脂溢性皮炎用什么洗发水| 牙疼吃什么| 蜗牛吃什么东西| 红萝卜什么时候种| 1989年属什么生肖| 八月十四是什么星座| 七月属什么生肖| 游泳比赛中wj是什么意思| 梦见自己流血是什么预兆| 吃什么减肥瘦肚子| 农历五月属什么生肖| e大饼是什么牌子| 细菌性阴道炎用什么药效果最好| 五月二十日是什么日子| 尿酸高吃什么药| 移民瑞士需要什么条件| 腮腺炎用什么药| 莴笋不能和什么一起吃| 痛风不能吃什么东西| 土地出让金是什么意思| 拔完智齿后需要注意什么| 肚子胀气是什么原因| 兰精莫代尔是什么面料| 释迦摩尼是什么意思| 喝茶对人体有什么好处| 老年人骨质疏松吃什么钙片好| 手腕有痣代表什么| 手足口病涂抹什么药膏| 大象的鼻子像什么| 男性吃什么生精快| 从头再来什么意思| 护理学和护理有什么区别| 氧化铜什么颜色| 甲状腺手术后有什么后遗症| 男人跑马是什么原因| 转氨酶高是什么| 梦到自己拉大便是什么预兆| 梦见两个小男孩是什么意思| 耳鸣需要做什么检查| 流鼻涕吃什么药好| 抗风疹病毒抗体igg高是什么意思| 斜视是什么症状| 倾字五行属什么| 非营运车辆是什么意思| 什么什么自语| 肉燕是什么| 双肺纹理增多是什么意思严重吗| 什么人不能喝丹参| 锌中毒是什么症状| 百日咳是什么引起的| 风湿病是什么原因造成的| 什么树枝| 送日子是什么意思| 肝功能看什么科室| 血压太低有什么危害| 局部癌变是什么意思| 肝火吃什么药| 吃什么补钾最快最好| 灵芝搭配什么煲汤最好| 射手什么象星座| 脱脂乳粉是什么| 梦见马是什么预兆| 鼓目念什么| 一个火一个斤念什么| 小孩脱水有什么症状| 12388是什么电话| 来月经吃什么对身体好| 为什么会有阴道炎| 命运多折 什么生肖| 二郎神叫什么名字| 巫婆是什么意思| 洁面膏和洗面奶有什么区别| 梨的功效与作用是什么| 来源朋友验证消息是什么意思| 梦见看电影是什么意思| 茄子能治什么病| 翻墙软件是什么| 什么是双向情感障碍| 绞股蓝有什么作用| 猫的耳朵有什么作用| 什么是阴阳人| 绝经三年了突然又出血了什么原因| 肌酐是检查什么的| 关节退行性改变是什么意思| 脚臭是什么原因引起的| 伊朗是什么派| 山青读什么| 衣服最小码是什么字母| 庹是什么意思| 仙灵脾又叫什么| 14数字代表什么意思| 北斗是什么| 史迪仔是什么动物| 吸血鬼怕什么| 4月28号是什么星座| 什么富什么车| 非营运车辆是什么意思| 睡着了咳嗽是什么原因| 身上长扁平疣是什么原因造成的| 什么动物最没有方向感| kumpoo是什么牌子| 叹气是什么意思| 以什么之名| 钾低了会出现什么症状| 11月7号是什么星座| 花枝鼠吃什么| 突然视力模糊是什么原因引起的| 金国是现在的什么地方| 属狗的守护神是什么菩萨| me too是什么意思| 包子都有什么馅| 8023是什么意思啊| 可塑性是什么意思| 什么枝什么叶| 白舌苔很厚是什么病症| 梦见吃饭是什么意思| 饱不洗头饿不洗澡是为什么| IB是什么| 青柑是什么| 蛇吃什么东西| 暑假什么时候结束| 梦见大蜘蛛是什么预兆| 为什么一热脸就特别红| 什么力气| 无奇不有是什么意思| 创字五行属什么| 茄子和什么相克| 水烧开后有白色沉淀物是什么| 盛夏是什么意思| plump什么意思| 过三关 是什么意思| 喜欢紫色的人是什么性格| 外阴过敏用什么药| 为什么会得带状疱疹| delsey是什么牌子| 什么是撸管| 破屋是什么意思| 什么面不能吃| 手串19颗代表什么意思| 琅琊榜是什么意思| 四叶草项链是什么牌子| 儿童心肌酶高有什么症状| 牙周炎吃什么消炎药| 威胁什么意思| 调理脾胃吃什么好| 痈肿疮疖是什么意思| 肺活量是什么意思| 奢侈的近义词是什么| 脑梗什么意思| 尿蛋白弱阳性什么意思| moi是什么意思| 神经元特异性烯醇化酶是什么意思| 补钙过量有什么害处| 什么是命运| 陈皮有什么功效作用| 卵泡是什么意思| 一票制什么意思| 眼睛模糊是什么原因引起的| 儿童便秘吃什么最快排便| 反流性食管炎不能吃什么食物| 益生菌适合什么人群吃| 什么是孝顺| 宰相和丞相有什么区别| 清秋是什么意思| 什么风什么号| 印迹杂交技术检查什么| 硒有什么功效和作用| 椰浆和椰汁有什么区别| 嘴唇上长痘是什么原因| 外伤用什么消炎药| 又什么又什么| 家里为什么突然有床虱| 何以是什么意思| 二月十八是什么星座| 自身免疫性胃炎是什么意思| 渚是什么意思| 佛是什么意思| 人的五官是什么| 高血压需要注意什么| pick是什么意思| ich是什么意思| 水杯用什么材质的好| 癸未日五行属什么| 小本生意做什么好赚钱快| 血压低吃什么补得快| 小鱼吃什么| 包臀裙配什么上衣| 什么动物不怕热| 05年属什么| 糖尿病人适合吃什么水果| 百度

广州南沙举办千人公益长跑活动 传递文明新风

百度 第17局iFTY果然如大哥所说,今天专跳机场捏软柿子Vega。

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
轻度溶血是什么意思 鼻涕倒流到咽喉老吐痰吃什么药能根治 膀胱是什么 分泌物过氧化氢阳性是什么意思 节制是什么意思
肝掌是什么症状 7月去青海带什么衣服 辗转是什么意思 公开课是什么意思 什么能让男人变大变长
queen是什么意思 什么的葡萄 惟字五行属什么 支原体衣原体是什么病 祛湿吃什么食物
beacon什么意思 腱鞘炎吃什么药最好 思密达什么意思 m代表什么 脚踝肿挂什么科
千呼万唤是什么生肖hcv9jop0ns4r.cn 下一个台风什么时候来hcv8jop7ns8r.cn 怀孕排卵试纸显示什么hcv8jop4ns4r.cn 男性尿道疼痛小便刺痛吃什么药hcv9jop6ns3r.cn 医是什么结构的字hcv8jop0ns0r.cn
潘驴邓小闲是什么意思hcv7jop9ns0r.cn 排卵日和排卵期有什么区别hcv9jop3ns7r.cn 血压偏低是什么原因hcv8jop4ns1r.cn 官印是什么意思hcv8jop7ns0r.cn 行尸走肉什么意思hcv7jop9ns7r.cn
弢是什么意思hcv8jop4ns1r.cn 露怯是什么意思hcv9jop2ns0r.cn 尿蛋白尿潜血同时出现说明什么hcv7jop9ns1r.cn 明鉴是什么意思hcv8jop2ns6r.cn 导诊是干什么的hcv8jop4ns4r.cn
翡翠对人体有什么好处hcv9jop6ns9r.cn 换手率高说明什么hcv7jop6ns9r.cn 肌肉抖动是什么原因hcv9jop0ns6r.cn 脸上长藓用什么药hcv7jop6ns6r.cn 牵牛花什么时候开hcv8jop0ns8r.cn
百度