Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean to be "standardised", and why is Haskell it? [closed]

Wikipedia claims that Haskell is "standardised", but the Haskell standard is not ratified by an internationally recognised standards body such as ISO; not even by a national body such as BSI or ANSI.

So what really are the criteria for a programming language to be labelled "standardised"? Does it just need to have a specification published on a website somewhere?

like image 721
Lightness Races in Orbit Avatar asked Jan 31 '13 14:01

Lightness Races in Orbit


1 Answers

You've answered your own question. A standardised language is one which is defined by some specification, be it a document or a 'reference implementation' in a language that is itself standardised and formalized (such as SML). Which body recognizes or approves the standard is not really at issue.

This is as opposed to an implementation-defined language, such as Perl or PHP, where what the language does is defined simply by what some particular "flagship" implementation of the language does.

So we can say a certain C compiler doesn't actually compile C properly, because it does not obey the standard. Meanwhile, we can't say that CPython does not interpret Python properly, because what it does is what Python does, by definition.

Haskell is defined by the Haskell Report, the latest version of which is Haskell 2010: http://www.haskell.org/onlinereport/haskell2010/

This report is crafted by a committee, voted on, and ratified. Furthermore, there historically have been and remain multiple Haskell compilers and interpreters which either conform to the report, or almost conform to the report, with documented exceptions.

Code written to the standard should be portable across compilers, and when divergences are found between compilers and the report (other than 'expected' ones), then it is usual that either the compiler or report will be changed to conform.

like image 146
sclv Avatar answered Oct 18 '22 03:10

sclv