Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Modular programming
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Language support== Languages that formally support the module concept include [[Ada (programming language)|Ada]], [[ALGOL]], [[BlitzMax]], [[C++]], [[C Sharp (programming language)|C#]], [[Clojure]], [[COBOL]], [[Common Lisp]], [[D (programming language)|D]], [[Dart (programming language)|Dart]], eC, [[Erlang (programming language)|Erlang]], [[Elixir (programming language)|Elixir]], [[Elm (programming language)|Elm]], [[F (programming language)|F]], [[F Sharp (programming language)|F#]], [[Fortran]], [[Go (programming language)|Go]], [[Haskell]], [[IBM/360]] [[IBM Basic assembly language and successors|Assembler]], [[Control Language]] (CL), [[IBM RPG]], [[Java (programming language)|Java]], [[Julia (programming language)|Julia]], [[MATLAB]], [[ML (programming language)|ML]], [[Modula]], [[Modula-2]], [[Modula-3]], Morpho, [[NEWP]], [[Oberon (programming language)|Oberon]], [[Oberon-2]], [[Objective-C]], [[OCaml]], several [[Pascal (programming language)|Pascal]] derivatives ([[Component Pascal]], [[Object Pascal]], [[Turbo Pascal]], [[UCSD Pascal]]), [[Perl]], [[PHP]], [[PL/I]], [[PureBasic]], [[Python (programming language)|Python]], [[R (programming language)|R]], [[Ruby (programming language)|Ruby]],<ref>{{Cite web|url=https://docs.ruby-lang.org/en/master/Module.html|title=class Module - Documentation for Ruby 3.5}}</ref> [[Rust (programming language)|Rust]], [[JavaScript]],<ref>[http://www.ecma-international.org/ecma-262/6.0/#sec-modules ECMAScript® 2015 Language Specification, 15.2 Modules]</ref> [[Visual Basic (.NET)]] and WebDNA. In the Java programming language, the term "package" is used for the analog of modules in the JLS;<ref>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.</ref> — see [[Java package]]. "[[Java Module System|Modules]]", a kind of collection of packages, were introduced in [[Java 9]] as part of [http://openjdk.java.net/projects/jigsaw/ Project Jigsaw]; these were earlier called "superpackages" were planned for Java 7. Conspicuous examples of languages that lack support for modules are [[C (programming language)|C]] and have been [[C++]] and Pascal in their original form, [[C (programming language)|C]] and [[C++]] do, however, allow separate compilation and declarative interfaces to be specified using [[header file]]s. Modules were added to Objective-C in [[iOS 7]] (2013); to C++ with [[C++20]],<ref>{{cite web|url=https://isocpp.org/files/papers/n4720.pdf|title=N4720: Working Draft, Extensions to C++ for Modules}}</ref> and Pascal was superseded by [[Modula]] and [[Oberon (programming language)|Oberon]], which included modules from the start, and various derivatives that included modules. [[JavaScript]] has had native modules since [[ECMAScript]] 2015. [[Precompiled header#Modules|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,<ref>{{Cite web|url=https://clang.llvm.org/docs/Modules.html|title=Modules|website=clang.llvm.org}}</ref> 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).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)