PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Standard ML

Standard ML

Standard ML is a pl created in 1990.

#145on PLDB 32Years Old 1.7kUsers
0Books 0Papers 392kRepos

Try now: Riju

Standard ML (SML; Standard Meta Language) is a general-purpose, modular, functional programming language with compile-time type checking and type inference. It is popular among compiler writers and programming language researchers, as well as in the development of theorem provers. SML is a modern dialect of ML, the programming language used in the Logic for Computable Functions (LCF) theorem-proving project. Read more on Wikipedia...


Example from Riju:
print "Hello, world!\n";
Example from hello-world:
fun hello() = print("Hello World\n"); hello()
Example from Linguist:
signature LAZY_BASE = sig type 'a lazy exception Undefined val force: 'a lazy -> 'a val delay: (unit -> 'a) -> 'a lazy val undefined: 'a lazy end signature LAZY' = sig include LAZY_BASE val isUndefined: 'a lazy -> bool val inject : 'a -> 'a lazy val toString: ('a -> string) -> 'a lazy -> string val eq: ''a lazy * ''a lazy -> bool val eqBy: ('a * 'a -> bool) -> 'a lazy * 'a lazy -> bool val compare: ('a * 'a -> order) -> 'a lazy * 'a lazy -> order val map: ('a -> 'b) -> 'a lazy -> 'b lazy structure Ops: sig val ! : 'a lazy -> 'a (* force *) val ? : 'a -> 'a lazy (* inject *) end end
Example from Wikipedia:
- haar [1, 2, 3, 4, ~4, ~3, ~2, ~1]; val it = [0,20,4,4,~1,~1,~1,~1] : int list

Language features

Feature Supported Example Token
Print() Debugging print
Semantic Indentation ϴ
Line Comments ϴ
bcpl.html · standard-ml.html · brainfuck.html

View source

PLDB - Build the next great programming language · v2022 · Day 31 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com