Talk:ML (programming language)
| This is the talk page for discussing improvements to the ML (programming language) article. This is not a forum for general discussion of the subject of the article. |
Article policies
|
| Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
| This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
| ||||||||||||||
ML vs. SML vs. ML family
[edit]The article mixes ML the language and ML the language family. Standard ML already has its own article. What are references to the original ML language (definition, syntax, semantics, usage, ..)? —Preceding unsigned comment added by Joswig (talk • contribs) 20:22, 15 February 2009 (UTC)
- At the moment the entire Examples section is purely SML, which is inappropriate for this article. I will be working to replace the SML in the examples section with the original ML language as defined in "Edinburgh LFC" (cited in article). If you poke around in there, you'll see the ML language as defined in that book and the SML in this article are incredibly different syntactically. I might take on working on adding ML to Pygments for syntax highlighting in code blocks, but that's a separate venture (ML explicitly embeds pplambda under double-quote blocks, so it's two langs in one if one were to be thorough). If I end up not following through, both ML and pplambda are decently simple and well-defined with BNF grammars and examples in "Edinburgh LFC" (doi:10.1007/3-540-09724-4). Loverthehater (talk) 21:51, 30 December 2025 (UTC)
- The examples section is redundant at best (see Standard ML) and misleading at worst. It didn't seem like there was any sort of notion of a "module" in ML, and the syntax is quite different. Snippets of ML from Edinburgh LFC, to illustrate difference in syntax (REPL example from page 19 and type definition from page 55, respectively):
#let fact n =
# letref count=n and result=1
# in if count=0
# then result
# loop count,result := count-1,count*result;;
fact = - : (int -> int)
#fact 4;;
24 : intabsrectype (*,**)tree = * + ** # (*,**)tree # (*,**)tree
with tiptree x = abstree(inl x)
and comptree(y,tl,t2) = abstree(inr(y,tl,t2))
and istip t = isl(reptree t)
and tipof t = outl(reptree t) ? failwith `tipof`
and labelof t = fst(outr(reptree t)) ? failwith `labelof`
and sonsof t = snd(outr(reptree t)) ? failwith `sonsof` ;;- To the extent that ML and SML show similarities, it doesn't rise to justification for showcasing it on the ML language page in lieu of ML examples, especially when the Standard ML article already exists. I'll see what I can do in the coming weeks, but for now it's a section that harms the quality of the article (misleading, ML != SML), so I removed it entirely. Loverthehater (talk) 22:54, 30 December 2025 (UTC)
- Another note, I checked out the textbook "Concepts of Programming Languages (10th ed.)" by Sebesta, it seems as though they refer to SML as "ML" in their writing, which is likely a mistake (or an unfortunate confusing shorthand for the purposes of this article, see p.257: claiming
datatypeis a keyword in ML when that only exists in SML; p.264: saying SML/NJ is an implementation of ML). I'll assume that the 4th edition had these same mislabeling/misattribution errors, and the textbook probably should not be cited within this article, since (from what I've gleaned) they only write about SML as "ML", and never about ML itself. I'll see if the overview section can be somewhat salvaged, but some statements might need to be removed there as well. Loverthehater (talk) 23:30, 30 December 2025 (UTC)
Example
[edit]Can someone conversant in ML fix the example? It is a cut a paste from the Haskell article and contains some obvious errors. For example, there is reference made to the "third line" but the example is only two lines. Osmodiar 18:55, 13 January 2006 (UTC)
Basic
[edit]What's wrong with Basic? — Preceding unsigned comment added by 12.156.82.241 (talk) 15:45, 7 June 2006 (UTC)
- It's simplistic and inexpressive. But Talk:BASIC is the correct place to discuss that. — Haeleth Talk 21:50, 7 June 2006 (UTC)
SML/NJ imperative
[edit]Why is SML/NJ categorised under imperative programming languages? — Preceding unsigned comment added by 165.146.85.25 (talk) 01:54, 25 July 2006 (UTC)
- Because it's possible to write a 100% imperative program in it. :)
- It is also categorised under functional programming languages: "ML language family" is a subcategory of "Functional languages", so everything in it is automatically considered functional. — Haeleth Talk 08:29, 25 July 2006 (UTC)
Overview
[edit]The first line has a grammatical error. Since I don't know enough about the subject matter I'm unable to fix it. But the "and therefore..." clause is an incomplete sentence. 68.36.46.101 01:55, 19 October 2007 (UTC)
Stuff removed from Boolean data type article
[edit]The following section was removed from the article Boolean data type:
Like Ocaml, ML has a
booltype that hastrueandfalsevalues. For example:- fun isittrue x = if x then "YES" else "NO" ; > val isittrue = fn : bool -> string - isittrue true; > val it = "YES" : string - isittrue false; > val it = "NO" : string - isittrue (8=8); > val it = "YES" : string - isittrue (7=5); > val it = "NO" : string
Is there a place for this text in the ML-related articles? Perhaps in the Wikibook? Thanks, and all the best, --Jorge Stolfi (talk) 23:47, 30 December 2009 (UTC)
ML possibly incorrectly marked as imperative
[edit]ML is a declarative language (source: [1] Page 13) as opposed to imperative as per the information on the wiki page. — Preceding unsigned comment added by Compileruser (talk • contribs) 23:19, 2 April 2012 (UTC)
- From The history of Standard ML (on page labeled "86:8"):
Like ISWIM, LCF/ML was at its core a call-by-value applicative language with basic expressions composed using function application. On top of this base functional language were added imperative features in the form of assignable variables, with a primitive assignment operator to update their contents, iterative control structures (loops), and failure (i.e., exception) raising and trapping constructs.
- I do not believe declarative languages typically allow in-place updates/mutations on data underlying variables, that's a core imperative feature. Loverthehater (talk) 20:22, 2 January 2026 (UTC)
Sources
|
|---|
|
Fun fac...
[edit]Are they seriously demonstrating the factorial function and *not* calling it "fun fact"? We need to change that on the double. Can I get an amen? — Preceding unsigned comment added by 206.21.122.76 (talk) 07:39, 4 December 2013 (UTC)
ML isn't Standard ML
[edit]The original ML was quite a different language. Type inference has always been a part of ML but there was no pattern matching, records, modules, or datatype declarations. I wouldn't expect to read BCPL and find examples written in C++11 either. Cooksbard90 (talk) 20:42, 7 March 2015 (UTC)
- Being addressed: Talk:ML (programming language)#ML vs. SML vs. ML family — Loverthehater (talk) 23:01, 30 December 2025 (UTC)
Disambiguation?
[edit]The concept of "meta language" is different from this specific language. I suggest a disambiguation note near the top. It would be comparable to having a language named "Compiler" (capital "C"). The concept of "compiler" exists outside of such a hypothetical language. 146.233.255.212 (talk) 22:13, 24 February 2021 (UTC)
- The article lead used to read like this:[1]
- ML is a general-purpose functional programming language developed by Robin Milner and others in the early 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM] It has roots in the Lisp language, and has been characterized as "LISP with types". Historically, ML stands for MetaLanguage: it was conceived to develop proof tactics in the LCF theorem prover (whose language, pplambda, a combination of the first-order predicate calculus and the simply-typed polymorphic lambda calculus, had ML as its metalanguage). It is known for its use of the Hindley–Milner type system, whose type inference algorithm can automatically assign the types of most expressions without requiring explicit type annotations. Additionally, the use of this algorithm ensures type safety – there is a formal proof that a well-typed ML program does not cause runtime type errors.
- However, this info about the meaning of ML's name got lost in the history of the article. – Tea2min (talk) 12:15, 25 February 2021 (UTC)
Is Haskell a ML?
[edit]Q: Yes or No, and why? slbtty (talk) 07:01, 5 October 2021 (UTC)
- A: Haskell is not an ML. It is non-strict, where ML is strict. It is pure, where ML is impure. It uses typeclasses and not modules. It has a similar type system but otherwise is very different, and indeed one of the motivations for Haskell was to explore strongly-typed functional programming in ways that ML had not. There is a lot of respect for ML in the Haskell community, but the answer is clearly `no`. — Preceding unsigned comment added by 2600:8800:6182:4990::13fd (talk) 18:14, 18 June 2022 (UTC)
Needs a history section; links provided
[edit]ML has a rich history, and it is well-documented. I'm not good at wikipedia, so I'll leave the links here for someone else to take all the glory.
Here's the original paper: http://www-public.it-sudparis.eu/~gibson/Teaching/CSC4504/ReadingMaterial/GordonMMNW78.pdf
Here's a good history, with lots of citations, from 2020: https://smlfamily.github.io/history/SML-history.pdf — Preceding unsigned comment added by 2600:8800:6182:4990:0:0:0:13FD (talk) 23:13, 18 June 2022 (UTC)
- I've started a little bit from an existing source on the page "From LCF to HOL: a short history". For the time being it's a single paragraph so I'm just using the top of the Overview section. Another paragraph would definitely warrant a history section (although I've seen smaller section stubs before, maybe it's fine to pull the trigger now). Both of these links lead to publications with DOI's, so I'll put them here (one was already broken, had to use wayback machine to trace it). Original paper: DOI 10.1145/512760.512773, and history with citations: DOI 10.1145/3386336, both PDF's available and free on the ACM. Loverthehater (talk) 00:38, 30 December 2025 (UTC)
Complete rework (deconflating ML from SML)
[edit]The article was in serious disrepair, so I've decided to take it upon myself to rework the article drastically to completely remove any confusion about "SML" or "ML family" being conflated with the original/classic ML language. I'm using Edinburgh LFC as the baseline definition of the language that is relevant to this article and any sources that refer to the ML language defined in that text (see reflist on the article or other topics on this talk page where I've linked), or any other updates/variations prior to the release of Standard ML. The language that this article is written on is sometimes referred to as LCF/ML or classic ML in order to further clarify the language being discussed, disambiguating it from later major developments e.g. SML disambiguate it from the confusion around SML.
You might see the edit history and be a bit concerned (or the opposite, if you shared my concerns) by the flurry of edits that I've put down as of recent. I get that I'm introducing content here that could potentially be flagged and further nitpicked (I'm no type theorist), but I can guarantee the quality is much better than what came before. Even if more bare, it is at the very least accurate and actually on the topic of the article. Input/edits/additions are very welcome as long as it is not trying to reintroduce the SML conflation that I am trying to steer this article away from. Please utilize the Standard ML page for more in-depth analysis, history, developments, explanations of features, etc. on the language that grew out of ML, developed in the 80's, and culminated in the language described in The Definition of Standard ML, published in 1990. Loverthehater (talk) 10:05, 3 January 2026 (UTC)
