The FunctionalProgrammingLanguage ML was originally developed by RobinMilner (TuringAward 1991) and was the first language to include PolymorphicTypeInference, together with a type-safe exception-handling mechanism. ML stands for MetaLanguage, not for MarkupLanguage. ML is not MachineLanguage.
ML is a StronglyTyped, StaticallyTyped language with semantics somewhat resembling those of the SchemeLanguage.
ML provides the following features:
- automatic TypeInference: Don't write types yourself, let the compiler do it for you!
- mostly declarative syntax using PatternMatching
- GenericTypes: Somewhat like C++'s templates (see CategoryCppTemplates).
- ParametricModules (functors): Modules can take other modules as an argument. (As far as I know, this is unique for ML.) (AnswerMe: I've tried to research this on the web aeons ago, and my understanding of how functors work still eludes me. Can someone point a clueless n00b to a step-by-step tutorial or fill in the gaps on HowMlFunctorsWork ? Thanks!)
Unlike Haskell [HaskellLanguage] (and like LispLanguage and Scheme), ML is strict: the arguments to a function are always evaluated before evaluating the body of the function (see StrictEvaluation and LazyEvaluation).
There are three ML dialects in wide use:
- O'Caml [ObjectiveCaml]
- Standard ML [SmlLanguage]
- F# [FsharpLanguage]
See http://www.mpi-sws.mpg.de/~rossberg/sml-vs-ocaml.html for a concise description of the differences between O'Caml and Standard ML.
Can we see some code snippet and syntax/notation examples here?
Maybe some SmlLanguage examples would satisfy. There is an example at that page already.
CategoryProgrammingLanguage CategoryFunctionalProgramming