[{"data":1,"prerenderedAt":366},["ShallowReactive",2],{"family-ml":3,"family-members-ml":294,"family-siblings":340},{"id":4,"title":5,"author":6,"body":7,"description":251,"extension":259,"family":260,"features":261,"homepage":268,"logo":269,"meta":270,"name":5,"navigation":271,"note":272,"path":273,"references":274,"relations":269,"seo":289,"status":290,"stem":291,"urls":269,"year":292,"__hash__":293},"families\u002Ffamilies\u002Fml.md","ML","Robin Milner and the Edinburgh LCF group",{"type":8,"value":9,"toc":250},"minimark",[10,15,19,23,55,59,62,156,216,224,228,231,235,238],[11,12,14],"h2",{"id":13},"overview","Overview",[16,17,18],"p",{},"ML is not a syntax so much as a type discipline. Robin Milner's ML grew out of\nthe Edinburgh LCF proof assistant, where a metalanguage was needed to write\ntactics, and the constraint chosen — fully inferred polymorphic types — became\nthe family's identity. Member languages differ in syntax, evaluation, and\nobject system, but they share that checking algorithm.",[11,20,22],{"id":21},"distinctive-traits","Distinctive traits",[24,25,26,35,46,49,52],"ul",{},[27,28,29,30,34],"li",{},"Polymorphism is inferred, not written. Hindley-Milner generalization computes\nthe most general type, so ",[31,32,33],"code",{},"let id x = x"," is polymorphic without annotations.",[27,36,37,38,41,42,45],{},"Algebraic data types with pattern matching. A constructor is the introduction\nrule and a ",[31,39,40],{},"match","\u002F",[31,43,44],{},"case"," clause is the elimination rule, checked for\ncompleteness.",[27,47,48],{},"The module system is part of the language. Signatures declare, structures\nimplement, and functors are functions from structures to structures.",[27,50,51],{},"Evaluation is eager by default, unlike the lazy branch of the functional\nfamily; recursion and higher-order functions carry the load instead.",[27,53,54],{},"Immutability is the default and mutation is explicit, which is what makes\ninference and generalization sound in the presence of references.",[11,56,58],{"id":57},"members-and-what-each-one-changed","Members and what each one changed",[16,60,61],{},"Membership means descent from that model. The table covers the principal\nbranches — the languages that changed something structural. The rest of the\nfamily is implementations that carried one of those branches to a new platform\nor a new guarantee, and the page's derived member list is authoritative.",[63,64,65,81],"table",{},[66,67,68],"thead",{},[69,70,71,75,78],"tr",{},[72,73,74],"th",{},"Language",[72,76,77],{},"Lineage",[72,79,80],{},"What it changed",[82,83,84,100,114,128,142],"tbody",{},[69,85,86,94,97],{},[87,88,89],"td",{},[90,91,93],"a",{"href":92},"\u002Flanguages\u002Fstandard-ml","Standard ML",[87,95,96],{},"ML (1983 definition, revised 1990 and 1997)",[87,98,99],{},"fixed the language and added the signature\u002Fstructure\u002Ffunctor module system",[69,101,102,108,111],{},[87,103,104],{},[90,105,107],{"href":106},"\u002Flanguages\u002Focaml","OCaml",[87,109,110],{},"Caml (INRIA, 1985) → Caml Light → OCaml (1996)",[87,112,113],{},"added objects and a full module system while keeping the core inference; Caml's bytecode lineage came from the categorical-abstract-machine work at INRIA",[69,115,116,122,125],{},[87,117,118],{},[90,119,121],{"href":120},"\u002Flanguages\u002Freasonml","ReasonML",[87,123,124],{},"OCaml syntax",[87,126,127],{},"a JavaScript-flavored surface syntax over OCaml, keeping its semantics and types",[69,129,130,136,139],{},[87,131,132],{},[90,133,135],{"href":134},"\u002Flanguages\u002Frescript","ReScript",[87,137,138],{},"ReasonML, renamed 2020",[87,140,141],{},"dropped OCaml compatibility to compile directly to JavaScript",[69,143,144,150,153],{},[87,145,146],{},[90,147,149],{"href":148},"\u002Flanguages\u002Ffsharp","F#",[87,151,152],{},"OCaml, ported to .NET",[87,154,155],{},"added .NET interop, units of measure, and computation expressions (2005)",[16,157,158,159,163,164,168,169,173,174,178,179,183,184,188,189,193,194,188,198,193,202,188,206,210,211,215],{},"Below the branch level the family splits along the axis each project chose to\npush: ",[90,160,162],{"href":161},"\u002Flanguages\u002Fsmlsharp","SML#"," extends record polymorphism toward SQL and C\ninteroperability, ",[90,165,167],{"href":166},"\u002Flanguages\u002Falice-ml","Alice ML"," adds futures, first-class\npackages, and constraint programming, ",[90,170,172],{"href":171},"\u002Flanguages\u002Fmanticore","Manticore"," adds\nparallel tuples and CML-style concurrency, ",[90,175,177],{"href":176},"\u002Flanguages\u002Fcakeml","CakeML"," adds a\nmachine-checked semantics and a verified compiler, and\n",[90,180,182],{"href":181},"\u002Flanguages\u002Fhamlet","HaMLet"," adds nothing at all — it is a deliberate reference\ntranslation of the Definition. ",[90,185,187],{"href":186},"\u002Flanguages\u002Fstandard-ml-of-new-jersey","Standard ML of New Jersey",",\n",[90,190,192],{"href":191},"\u002Flanguages\u002Fpoly-ml","Poly\u002FML",", ",[90,195,197],{"href":196},"\u002Flanguages\u002Fmlton","MLton",[90,199,201],{"href":200},"\u002Flanguages\u002Fmoscow-ml","Moscow ML",[90,203,205],{"href":204},"\u002Flanguages\u002Fmlkit","MLKit",[90,207,209],{"href":208},"\u002Flanguages\u002Fmlj","MLj",", and ",[90,212,214],{"href":213},"\u002Flanguages\u002Fyeti","Yeti"," are implementations of the\ncore language, differing in compilation strategy and target rather than in\nwhat the language is.",[16,217,218,219,223],{},"The pattern is divergence by ",[220,221,222],"em",{},"host platform or guarantee",": OCaml and Standard ML\nvary the module system, Reason and ReScript vary the surface syntax for\nJavaScript, and F# varies the runtime. The type-inference core is the part that\ndoes not change.",[11,225,227],{"id":226},"status","Status",[16,229,230],{},"Active. OCaml, F# (via .NET), and Standard ML implementations are all in\nproduction use, and the inference algorithm itself is the default expectation\nfor new statically typed functional languages.",[11,232,234],{"id":233},"history","History",[16,236,237],{},"Milner built ML as the metalanguage of Edinburgh LCF in the early 1970s, drawing\non the typed lambda calculus work of Hindley and Milner and on Landin's ISWIM.\nThe 1983 Standard ML definition fixed a common language; the 1990 definition and\nits 1997 revision are the canonical documents, with the module system added by\nthe 1990s revisions. Caml took the language in a separate direction at INRIA,\nand OCaml and F# followed from there.",[239,240,241],"note",{},[16,242,243,244,246,247,249],{},"Read ",[90,245,93],{"href":92}," for the fixed definition and\n",[90,248,107],{"href":106}," for the industrial fork; the difference between them\nis mostly what the module system is allowed to do.",{"title":251,"searchDepth":252,"depth":252,"links":253},"",2,[254,255,256,257,258],{"id":13,"depth":252,"text":14},{"id":21,"depth":252,"text":22},{"id":57,"depth":252,"text":58},{"id":226,"depth":252,"text":227},{"id":233,"depth":252,"text":234},"md","ml",[262,263,264,265,266,267],"hindley-milner-inference","parametric-polymorphism","algebraic-data-types","pattern-matching","module-system","immutable-by-default","https:\u002F\u002Fsmlfamily.github.io\u002F",null,{},true,"The family defined by Hindley-Milner inference: polymorphism is inferred rather than annotated, algebraic data types are matched by pattern, and the module system (signatures, structures, functors) abstracts over implementations. Milner's ML at Edinburgh LCF began it; Standard ML, Caml, OCaml, and F# descend from it.","\u002Ffamilies\u002Fml",[275,277,280,283,286],{"url":268,"title":276},"The Standard ML Family Project — definitions, history, implementations",{"url":278,"title":279},"https:\u002F\u002Fsmlfamily.github.io\u002Fsml97-defn.pdf","The Definition of Standard ML, Revised (SML '97) — Milner, Tofte, Harper, MacQueen (MIT Press)",{"url":281,"title":282},"https:\u002F\u002Focaml.org\u002F","OCaml — official site",{"url":284,"title":285},"https:\u002F\u002Ffsharp.org\u002F","F# Software Foundation",{"url":287,"title":288},"https:\u002F\u002Fwww.polyml.org\u002F","Poly\u002FML — Standard ML implementation (David Matthews)",{"title":5,"description":251},"active","families\u002Fml",1973,"sohM14hEuu4knx6VFyh-pUz5fOto7szIi7hRVDV7UdA",[295,296,298,301,303,305,307,308,310,311,312,314,319,321,327,331,336],{"name":149,"path":148,"logo":269,"year":269,"kind":269,"status":269,"note":269,"paradigms":269,"typing":269},{"name":182,"path":181,"logo":269,"year":269,"kind":269,"status":290,"note":297,"paradigms":269,"typing":269},"HaMLet ('To Be Or Not To Be Standard ML'): a faithful reference implementation of SML '97, written entirely in Standard ML as a deliberately direct translation of the Definition's semantic rules. Can run parsing, elaboration, and evaluation selectively — including untyped evaluation — and doubles as a catalogue of known grey areas in the Definition.",{"name":209,"path":208,"logo":269,"year":269,"kind":269,"status":299,"note":300,"paradigms":269,"typing":269},"dormant","MLj: a Standard ML compiler that targets the Java Virtual Machine, implementing an SML '97 subset with extensions for working with Java classes from ML. Developed at Edinburgh and later commercialised by Persimmon IT.",{"name":205,"path":204,"logo":269,"year":269,"kind":269,"status":269,"note":302,"paradigms":269,"typing":269},"MLKit: Martin Elsman's Standard ML compiler, best known for region-based memory management — a static analysis places allocations into regions and deallocates a whole region at once, so most programs need no tracing collector.",{"name":197,"path":196,"logo":269,"year":269,"kind":269,"status":269,"note":304,"paradigms":269,"typing":269},"MLton: a whole-program optimizing Standard ML compiler. It compiles the entire program at once, which is what lets it apply defunctorization and monomorphisation across module boundaries that a separate-compilation compiler cannot see.",{"name":201,"path":200,"logo":269,"year":269,"kind":269,"status":269,"note":306,"paradigms":269,"typing":269},"Moscow ML: a light-weight Standard ML implementation built on the runtime system of Caml Light, created by Sergei Romanenko at the Keldysh Institute and developed further with Claudio Russo, Niels Kokholm, Ken Friis Larsen, and Peter Sestoft. Implements SML '97 including modules, and compiles to compact stand-alone bytecode executables.",{"name":107,"path":106,"logo":269,"year":269,"kind":269,"status":269,"note":269,"paradigms":269,"typing":269},{"name":192,"path":191,"logo":269,"year":269,"kind":269,"status":269,"note":309,"paradigms":269,"typing":269},"An implementation of Standard ML",{"name":121,"path":120,"logo":269,"year":269,"kind":269,"status":269,"note":269,"paradigms":269,"typing":269},{"name":135,"path":134,"logo":269,"year":269,"kind":269,"status":269,"note":269,"paradigms":269,"typing":269},{"name":187,"path":186,"logo":269,"year":269,"kind":269,"status":269,"note":313,"paradigms":269,"typing":269},"SML\u002FNJ: the long-running Standard ML implementation from Bell Labs and Princeton, and historically the system new SML features and the Standard ML Basis Library were prototyped in. Lists itself under the SML family's implementations rather than as a separate language.",{"name":93,"path":92,"logo":269,"year":269,"kind":269,"status":269,"note":269,"paradigms":315,"typing":269},[316,317,318],"functional","imperative","modular",{"name":214,"path":213,"logo":269,"year":269,"kind":269,"status":299,"note":320,"paradigms":269,"typing":269},"Yeti: an ML-style functional language for the JVM, written in Java and compiling to JVM bytecode. Listed by the Standard ML Family Project as a close cousin of the SML family.",{"name":167,"path":166,"logo":269,"year":322,"kind":269,"status":299,"note":323,"paradigms":324,"typing":326},2002,"Standard ML extended with futures (laziness plus implicit dataflow synchronisation), higher-order modules and abstract signatures, first-class dynamic packages, type-safe pickling, and constraint programming — a research language for concurrent, distributed, and constraint-based programming. Developed as the 'Stockhausen' system, renamed Alice in 2001, first released publicly as Alice 0.9 in December 2002.",[325,316,317],"concurrent","static",{"name":162,"path":161,"logo":269,"year":328,"kind":269,"status":290,"note":329,"paradigms":330,"typing":326},2003,"SML# ('sharp'): a Standard ML-compatible language from Tohoku University built around record polymorphism, which makes field selection and records first-class enough to integrate relational operations directly. Adds seamless C interoperability and direct SQL access while keeping SML compatibility.",[316,317,318],{"name":172,"path":171,"logo":269,"year":332,"kind":269,"status":299,"note":333,"paradigms":334,"typing":326},2007,"Manticore: a high-level parallel functional language from the University of Chicago and RIT, targeted at multicore hardware. Combines explicit concurrency through CML-style channels with fine-grain parallelism through parallel tuples and NESL\u002FNepal-style parallel array comprehensions.",[335,325,316],"parallel",{"name":177,"path":176,"logo":269,"year":337,"kind":269,"status":290,"note":338,"paradigms":339,"typing":269},2014,"CakeML: a functional language based on a substantial subset of Standard ML, defined by a formal semantics in higher-order logic and shipped with an end-to-end verified compiler that has been bootstrapped — the compiler compiles itself and the resulting binary provably implements it.",[316],[341,344,347,350,353,356,357,360,363],{"name":342,"path":343},"ALGOL","\u002Ffamilies\u002Falgol",{"name":345,"path":346},"C","\u002Ffamilies\u002Fc",{"name":348,"path":349},"ECMAScript","\u002Ffamilies\u002Fecmascript",{"name":351,"path":352},"HCL","\u002Ffamilies\u002Fhcl",{"name":354,"path":355},"Lisp","\u002Ffamilies\u002Flisp",{"name":5,"path":273},{"name":358,"path":359},"OBJ","\u002Ffamilies\u002Fobj",{"name":361,"path":362},"PL\u002FI","\u002Ffamilies\u002Fpl-i",{"name":364,"path":365},"Smalltalk","\u002Ffamilies\u002Fsmalltalk",1795219071688]