Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / LanguageChanges.adoc
CommitLineData
7f918cf1
CE
1LanguageChanges
2===============
3
4We are sometimes asked to modify MLton to change the language it
5compiles. In short, we are conservative about making such changes.
6There are a number of reasons for this.
7
8* <:DefinitionOfStandardML:The Definition of Standard ML> is an
9extremely high standard of specification. The value of the Definition
10would be significantly diluted by changes that are not specified at an
11equally high level, and the dilution increases with the complexity of
12the language change and its interaction with other language features.
13
14* The SML community is small and there are a number of
15<:StandardMLImplementations:SML implementations>. Without an
16agreed-upon standard, it becomes very difficult to port programs
17between compilers, and the community would be balkanized.
18
19* Our main goal is to enable programmers to be as effective as
20possible with MLton/SML. There are a number of improvements other
21than language changes that we could spend our time on that would
22provide more benefit to programmers.
23
24* The more the language that MLton compiles changes over time, the
25more difficult it is to use MLton as a stable platform for serious
26program development.
27
28Despite these drawbacks, we have extended SML in a couple of cases.
29
30* <:ForeignFunctionInterface: Foreign function interface>
31* <:MLBasis: ML Basis system>
32* <:SuccessorML: Successor ML features>
33
34We allow these language extensions because they provide functionality
35that is impossible to achieve without them or have non-trivial
36community support. The Definition does not define a foreign function
37interface. So, we must either extend the language or greatly restrict
38the class of programs that can be written. Similarly, the Definition
39does not provide a mechanism for namespace control at the module
40level, making it impossible to deliver packaged libraries and have a
41hope of users using them without name clashes. The ML Basis system
42addresses this problem. We have also provided a formal specification
43of the ML Basis system at the level of the Definition.
44
45== Also see ==
46
47* http://www.mlton.org/pipermail/mlton/2004-August/016165.html
48* http://www.mlton.org/pipermail/mlton-user/2004-December/000320.html