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
Computer program
(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!
====ML==== [[ML (programming language)|ML]] (1973)<ref name="Gordon1996">{{cite web | last = Gordon | first = Michael J. C. | author-link = Michael J. C. Gordon | year = 1996 | title = From LCF to HOL: a short history | url = http://www.cl.cam.ac.uk/~mjcg/papers/HolHistory.html | access-date = 2021-10-30 | archive-date = 2016-09-05 | archive-url = https://web.archive.org/web/20160905201847/http://www.cl.cam.ac.uk/~mjcg/papers/HolHistory.html | url-status = live }}</ref> stands for "Meta Language". ML checks to make sure only data of the same type are compared with one another.<ref name="cpl_3rd-ch9-233">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 233 | isbn = 0-201-71012-9 }}</ref> For example, this function has one input parameter (an integer) and returns an integer: {{sxhl|2=sml|1=fun times_10(n : int) : int = 10 * n;}} ''ML'' is not parenthesis-eccentric like ''Lisp''. The following is an application of <code>times_10()</code>: times_10 2 It returns "20 : int". (Both the results and the datatype are returned.) Like ''Lisp'', ''ML'' is tailored to process lists. Unlike ''Lisp'', each element is the same datatype.<ref name="cpl_3rd-ch9-235">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 235 | isbn = 0-201-71012-9 }}</ref> Moreover, ''ML'' assigns the datatype of an element at [[compile time]]. Assigning the datatype at compile time is called [[Name binding#Binding time|static binding]]. Static binding increases reliability because the compiler checks the context of variables before they are used.<ref name="cpl_3rd-ch3-55">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 55 | isbn = 0-201-71012-9 }}</ref>
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)