Meta tags:
Headings (most frequently used words):
edit, navigation, tools, ml, programming, language, contents, overview, examples, see, also, references, further, reading, external, links, menu, factorial, list, reverse, modules, personal, namespaces, views, contribute, print, export, languages,
Text of the page (most frequently used words):
the (72), and (38), #programming (23), languages (18), #language (18), fac (18), function (17), this (16), type (16), for (15), standard (14), edit (12), fun (10), int (10), from (9), are (9), wikipedia (8), file (8), functional (8), implementation (8), rat (8), can (8), reverse (8), integer (8), use (7), with (7), isbn (7), milner (7), list (7), more (6), not (6), articles (6), haskell (6), robin (6), ocaml (6), signature (6), like (6), that (6), page (5), links (5), all (5), pattern (5), matching (5), press (5), elm (5), also (5), its (5), such (5), factorial (5), argument (5), other (5), additional (4), may (4), using (4), article (4), references (4), typed (4), elements (4), university (4), mit (4), further (4), system (4), first (4), used (4), modules (4), example (4), structure (4), end (4), val (4), one (4), acc (4), call (4), but (4), types (4), formal (4), about (3), was (3), version (3), navigation (3), history (3), read (3), create (3), identifiers (3), wayback (3), short (3), 1973 (3), family (3), retrieved (3), org (3), libraries (3), lists (3), java (3), sml (3), compiler (3), robert (3), 262 (3), mads (3), tofte (3), definition (3), these (3), nemerle (3), polymorphism (3), see (3), zero (3), following (3), whose (3), then (3), case (3), when (3), has (3), annotations (3), syntax (3), examples (3), most (3), influenced (3), theorem (3), general (3), purpose (3), uses (3), evaluation (3), static (3), developers (2), view (2), contact (2), privacy (2), policy (2), terms (2), non (2), last (2), 2022 (2), pdf (2), print (2), wikidata (2), special (2), upload (2), related (2), changes (2), tools (2), learn (2), help (2), contents (2), english (2), talk (2), categories (2), template (2), needing (2), 2015 (2), description (2), https (2), php (2), ml_ (2), programming_language (2), rust (2), lisp (2), kotlin (2), erlang (2), loop (2), verified (2), runtime (2), whole (2), program (2), machine (2), net (2), framework (2), new (2), external (2), harper (2), 1991 (2), 1996 (2), 1997 (2), 63137 (2), commentary (2), revised (2), reading (2), 2014 (2), 101 (2), seven (2), development (2), 2021 (2), lcf (2), source (2), dialect (2), coq (2), evaluated (2), early (2), lazy (2), dependent (2), ats (2), implemented (2), via (2), functions (2), data (2), code (2), sum (2), succ (2), arith (2), rational (2), class (2), parametric (2), have (2), return (2), requiring (2), rewritten (2), time (2), returns (2), order (2), else (2), domain (2), raise (2), let (2), fact (2), writing (2), inner (2), calls (2), achieved (2), adding (2), negative (2), exception (2), recursive (2), infinite (2), part (2), will (2), base (2), describes (2), result (2), inference (2), without (2), expression (2), similar (2), mathematics (2), dialects (2), there (2), cyclone (2), others (2), proof (2), calculus (2), polymorphic (2), iswim (2), edinburgh (2), does (2), through (2), value (2), garbage (2), collection (2), typing (2), overview (2), well (2), verification (2), imperative (2), paradigm (2), sources (2), citations (2), jump (2), web (2), cookie, statement, statistics, mobile, disclaimers, text, available, under, apply, site, you, agree, registered, trademark, profit, organization, wikimedia, foundation, inc, creative, commons, attribution, sharealike, license, edited, december, utc, українська, türkçe, тоҷикӣ, svenska, suomi, srpskohrvatski, српскохрватски, српски, srpski, русский, português, polski, norsk, bokmål, 日本語, nederlands, magyar, עברית, italiano, hrvatski, 한국어, français, فارسی, esperanto, español, ελληνικά, deutsch, català, aragonés, العربية, printable, download, export, item, cite, information, permanent, link, pages, what, here, recent, community, portal, contribute, donate, random, current, events, main, views, namespaces, log, account, contributions, logged, personal, menu, hidden, nkc, lccn, j9u, webarchive, different, created, statically, procedural, academic, index, title, oldid, 1128172459, czech, republic, united, states, israel, national, authority, control, category, based, generational, categorical, alphabetical, swift, smalltalk, simula, shell, sql, ruby, python, prolog, perl, pascal, lua, javascript, fortran, forth, cobol, basic, assembly, apl, algol, ada, timeline, comparison, cakeml, eval, formally, translation, assembler, successor, mlton, optimizing, 2010, archived, microsoft, jersey, another, popular, prentice, hall, 1994, 1998, 790387, jeffrey, ullman, 2011, carnegie, mellon, cambridge, 521, 57050, lawrence, paulson, working, programmer, 1990, edition, adds, author, david, macqueen, 63181, tate, bruce, daoud, fred, dees, ian, moffitt, jack, book, november, pragmatic, programmers, llc, creator, evan, czaplicki, says, tend, say, get, shared, heritage, referring, 978, 941222, weeks, russian, software, network, project, team, january, forces, 2007, hol, gordon, michael, sebesta, 1999, 4th, addison, westley, 201, 38596, concepts, contexts, environments, scope, theory, journal, computer, sciences, 348, 375, 1978, metalanguages, ecmascript, typescript, coffeescript, open, cross, platform, implement, educational, pal, experimental, lazily, 1980s, dependently, extension, implementations, way, imported, into, interpreter, command, interaction, only, allowed, possible, object, directly, block, hides, detail, outside, datatype, struct, sig, structuring, large, projects, module, consists, files, specifies, header, implements, define, arithmetic, numbers, interface, api, consume, any, same, foldl, while, correct, clear, inefficient, execution, execute, linear, quadratic, precisely, compared, given, reverses, improved, need, grow, proportion, number, extra, parameter, arrive, accumulator, stack, tail, problematic, demonstrates, guaranteed, terminate, since, causes, robust, would, check, nonnegative, before, recursing, follows, descending, chain, relies, important, note, parameters, necessarily, parentheses, separated, spaces, cases, second, line, tried, executes, again, until, reached, recursion, shown, optional, notation, instance, assigned, applying, accepts, thanks, omitted, derived, looks, single, terminating, descriptions, factorials, found, textbooks, much, facility, expressed, pure, differ, small, ways, today, several, three, prominent, ideas, numerous, developed, 1970s, inspired, historically, conceived, develop, tactics, combination, simply, had, metalanguage, lambda, predicate, pplambda, prover, strengths, mostly, applied, design, manipulation, compilers, analyzers, provers, financial, systems, bioinformatics, referred, because, although, encourages, allow, unlike, meaning, subexpressions, always, though, thus, streams, their, indirect, closures, eager, purely, side, effects, impure, features, include, automatic, memory, management, rules, scoping, handling, algebraic, strategy, known, which, automatically, assigns, explicit, ensures, safety, cause, errors, provides, arguments, heavily, research, few, completely, specified, make, suited, commonly, operate, automated, proving, semantics, currying, expressions, hindley, meta, scala, opa, miranda, idris, clojure, strong, inferred, discipline, years, ago, appeared, designed, generic, multi, how, remove, message, please, unsourced, material, challenged, removed, jstor, scholar, books, newspapers, news, find, reliable, improve, needs, search, free, encyclopedia, http, archive, 20221221140955, wiki, timestamps, capture, fail, success, 2023, jan, dec, nov, apr, 2005, sep, 2026, 647, captures,
Text of the page (random words):
ml programming language wikipedia 647 captures 21 apr 2005 17 sep 2026 nov dec jan 21 2021 2022 2023 success fail about this capture timestamps the wayback machine http web archive org web 20221221140955 https en wikipedia org wiki ml_ programming_language ml programming language from wikipedia the free encyclopedia jump to navigation jump to search general purpose functional programming language for other uses see ml this article needs additional citations for verification please help improve this article by adding citations to reliable sources unsourced material may be challenged and removed find sources ml programming language news newspapers books scholar jstor may 2015 learn how and when to remove this template message ml paradigm multi paradigm functional generic imperative designed by robin milner and others at the university of edinburgh first appeared 1973 49 years ago 1973 typing discipline inferred static strong dialects ocaml standard ml f influenced by iswim influenced clojure coq cyclone c elm f f haskell idris kotlin miranda nemerle ocaml opa erlang rust scala standard ml ml meta language is a general purpose functional programming language it is known for its use of the polymorphic hindley milner type system which automatically assigns the types of most expressions without requiring explicit type annotations and ensures type safety there is a formal proof that a well typed ml program does not cause runtime type errors 1 ml provides pattern matching for function arguments garbage collection imperative programming call by value and currying it is used heavily in programming language research and is one of the few languages to be completely specified and verified using formal semantics its types and pattern matching make it well suited and commonly used to operate on other formal languages such as in compiler writing automated theorem proving and formal verification contents 1 overview 2 examples 2 1 factorial 2 2 list reverse 2 3 modules 3 see also 4 references 5 further reading 6 external links overview edit features of ml include a call by value evaluation strategy first class functions automatic memory management through garbage collection parametric polymorphism static typing type inference algebraic data types pattern matching and exception handling ml uses static scoping rules 2 ml can be referred to as an impure functional language because although it encourages functional programming it does allow side effects 3 like languages such as lisp but unlike a purely functional language such as haskell like most programming languages ml uses eager evaluation meaning that all subexpressions are always evaluated though lazy evaluation can be achieved through the use of closures thus one can create and use infinite streams as in haskell but their expression is indirect ml s strengths are mostly applied in language design and manipulation compilers analyzers theorem provers but it is a general purpose language also used in bioinformatics and financial systems ml was developed by robin milner and others in the early 1970s at the university of edinburgh 4 and its syntax is inspired by iswim historically ml 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 today there are several languages in the ml family the three most prominent are standard ml sml ocaml and f ideas from ml have influenced numerous other languages like haskell cyclone nemerle 5 ats and elm 6 examples edit the following examples use the syntax of standard ml other ml dialects such as ocaml and f differ in small ways factorial edit the factorial function expressed as pure ml fun fac 0 int int 1 fac n int int n fac n 1 this describes the factorial as a recursive function with a single terminating base case it is similar to the descriptions of factorials found in mathematics textbooks much of ml code is similar to mathematics in facility and syntax part of the definition shown is optional and describes the types of this function the notation e t can be read as expression e has type t for instance the argument n is assigned type integer int and fac n int the result of applying fac to the integer n also has type integer the function fac as a whole then has type function from integer to integer int int that is fac accepts an integer as an argument and returns an integer result thanks to type inference the type annotations can be omitted and will be derived by the compiler rewritten without the type annotations the example looks like fun fac 0 1 fac n n fac n 1 the function also relies on pattern matching an important part of ml programming note that parameters of a function are not necessarily in parentheses but separated by spaces when the function s argument is 0 zero it will return the integer 1 one for all other cases the second line is tried this is the recursion and executes the function again until the base case is reached this implementation of the factorial function is not guaranteed to terminate since a negative argument causes an infinite descending chain of recursive calls a more robust implementation would check for a nonnegative argument before recursing as follows fun fact n let fun fac 0 1 fac n n fac n 1 in if n 0 then raise domain else fac n end the problematic case when n is negative demonstrates a use of ml s exception system the function can be improved further by writing its inner loop as a tail call such that the call stack need not grow in proportion to the number of function calls this is achieved by adding an extra accumulator parameter to the inner function at last we arrive at fun fact n let fun fac 0 acc acc fac n acc fac n 1 n acc in if n 0 then raise domain else fac n 1 end list reverse edit the following function reverses the elements in a list more precisely it returns a new list whose elements are in reverse order compared to the given list fun reverse reverse x xs reverse xs x this implementation of reverse while correct and clear is inefficient requiring quadratic time for execution the function can be rewritten to execute in linear time fun a reverse xs a list list foldl op xs this function is an example of parametric polymorphism that is it can consume lists whose elements have any type and return lists of the same type modules edit modules are ml s system for structuring large projects and libraries a module consists of a signature file and one or more structure files the signature file specifies the api to be implemented like a c header file or java interface file the structure implements the signature like a c source file or java class file for example the following define an arithmetic signature and an implementation of it using rational numbers signature arith sig type t val zero t val succ t t val sum t t t end structure rational arith struct datatype t rat of int int val zero rat 0 1 fun succ rat a b rat a b b fun sum rat a b rat c d rat a d c b b d end these are imported into the interpreter by the use command interaction with the implementation is only allowed via the signature functions for example it is not possible to create a rat data object directly via this code the structure block hides all the implementation detail from outside ml s standard libraries are implemented as modules in this way see also edit standard ml and standard ml implementations dependent ml a dependently typed extension of ml ats a further development of dependent ml lazy ml an experimental lazily evaluated ml dialect from the early 1980s pal programming language an educational language related to ml ocaml an ml dialect used to implement coq f an open source cross platform functional first language for the net framework coffeescript and typescript metalanguages for ecmascript references edit robin milner a theory of type polymorphism in programming journal of computer and system sciences 17 3 348 375 1978 milner robin tofte mads 1991 4 1 contexts environments and scope commentary on standard ml the mit press pp 35 36 isbn 0 262 63137 7 sebesta robert 1999 concepts of programming languages 4th ed addison westley p 54 isbn 0 201 38596 1 gordon michael j c 1996 from lcf to hol a short history retrieved 2007 10 11 programming language for special forces of developers russian software development network nemerle project team retrieved january 24 2021 tate bruce a daoud fred dees ian moffitt jack 2014 3 elm seven more languages in seven weeks book version p1 0 november 2014 ed the pragmatic programmers llc pp 97 101 isbn 978 1 941222 15 7 on page 101 elm creator evan czaplicki says i tend to say elm is an ml family language to get at the shared heritage of all these languages these languages is referring to haskell ocaml sml and f further reading edit the definition of standard ml robin milner mads tofte robert harper mit press 1990 revised edition adds author david macqueen mit press 1997 isbn 0 262 63181 4 the definition of standard ml revised commentary on standard ml robin milner mads tofte mit press 1997 isbn 0 262 63137 7 ml for the working programmer lawrence paulson cambridge university press 1991 1996 isbn 0 521 57050 6 harper robert 2011 programming in standard ml pdf carnegie mellon university elements of ml programming jeffrey d ullman prentice hall 1994 1998 isbn 0 13 790387 1 external links edit standard ml of new jersey another popular implementation f an ml implementation using the microsoft net framework archived 2010 02 18 at the wayback machine mlton a whole program optimizing standard ml compiler successor ml or sml cakeml a read eval print loop version of ml with formally verified runtime and translation to assembler v t e programming languages comparison timeline history ada algol apl assembly basic c c c cobol erlang forth fortran go haskell java javascript kotlin lisp lua ml pascal perl php prolog python r ruby rust sql shell simula smalltalk swift more lists alphabetical categorical generational non english based category authority control national libraries israel united states czech republic retrieved from https en wikipedia org w index php title ml_ programming_language oldid 1128172459 categories academic programming languages functional languages procedural programming languages ml programming language family pattern matching programming languages statically typed programming languages programming languages created in 1973 hidden categories articles with short description short description is different from wikidata articles needing additional references from may 2015 all articles needing additional references webarchive template wayback links articles with j9u identifiers articles with lccn identifiers articles with nkc identifiers navigation menu personal tools not logged in talk contributions create account log in namespaces article talk english views read edit view history more navigation main page contents current events random article about wikipedia contact us donate contribute help learn to edit community portal recent changes upload file tools what links here related changes upload file special pages permanent link page information cite this page wikidata item print export download as pdf printable version languages العربية aragonés català deutsch ελληνικά español esperanto فارسی français 한국어 hrvatski italiano עברית magyar nederlands 日本語 norsk bokmål polski português русский српски srpski srpskohrvatski српскохрватски suomi svenska тоҷикӣ türkçe українська 中文 edit links this page was last edited on 18 december 2022 at 20 16 utc text is available under the creative commons attribution sharealike license 3 0 additional terms may apply by using this site you agree to the terms of use and privacy policy wikipedia is a registered trademark of the wikimedia foundation inc a non profit organization privacy policy about wikipedia disclaimers contact wikipedia mobile view developers statistics cookie statement
|