Talk:Standard ML

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Talk[edit]

This page currently reads like a list of press releases for various implementations of SML. I'd like to add a bit more history and general background on SML to the top of the page (should get this posted at some point). I'm also thinking of trimming down the current content to a list of implementations, perhaps with no associated text at all (just the links), or maybe with a quick summary of the differences between them. But in its current form it seems no good. -- Vrable 22:39 8 Jul 2003 (UTC)

Very nice plan! And be bold! :-) --Menchi 02:37 11 Jul 2003 (UTC)
Fine by me too. I've been meaning to do so at some point, but haven't gotten around to it yet. The last time I planned to I got distracted by Type polymorphism, and wrote an article about that instead that might be useful to link to from a future article on this page.
The infopage on SML at the SML/NJ site may be of use as a factual source: http://www.smlnj.org/sml.html --Delirium 02:40 11 Jul 2003 (UTC)

other SMLs?[edit]

Moved from the article:

Comment: shouldn't this page also mention SML - simple markup language? (http://xmlhack.com/read.php?item=116)

I don't have any comment (other than to note that the link appears broken). Neilc 04:09, 19 Nov 2004 (UTC)

Requested move[edit]

At the moment, Standard ML is a redirect to SML programming language. Given that SML is just an abbreviation for the official name Standard ML shouldn't that be the other way around? (And shouldn't it be SML (programming language) anyway?) -- Tobias Bergemann 06:09, 6 September 2005 (UTC)[reply]

Note: I cannot use the move function to rename/move SML programming language to Standard ML: Standard ML, while being a redirect page, has a change history, and so the move requires the assistance of a Wikipedia administrator. -- Tobias Bergemann 16:19, 6 October 2005 (UTC)[reply]

The use of the suffix programming language for pages like SML programming language may be a historical relict as this hack was needed on Ward's wiki which required CamelCase for page titles and therefore didn't support titles consisting of a single word. I am surprised to find that this use is apparently mandated by the Wikipedia naming conventions for languages which at the same time mandate the creation of a parenthesed redirect page SML (programming language) so that the pipe trick can still be used. -- Tobias Bergemann 16:04, 6 October 2005 (UTC)[reply]

  • Based on the conventions page, it seems clear that "Standard ML" would be allowed, since that wouldn't conflict with anything else. The sooner we can get away from holdovers from old-school wiki hacks, the better. ;) — brighterorange (talk) 17:09, 6 October 2005 (UTC)[reply]

Discision[edit]

Page moved, have a great day :)! Ryan Norton T | @ | C 12:07, 15 October 2005 (UTC)[reply]

reversal in Haar wavelet example[edit]

The Haar wavelet example is nice, but doesn't it get some of the signs wrong? Because it reverses the order with each decomposition level, the differences for every odd decomposition level are wrong. The order reversal itself is also not what one might expect in the result. I think it should be:

  - fun haar l =
      let fun aux [s] [] d = d @ [s]
            | aux [] s d = aux s [] d
            | aux (h1::h2::t) s d =
              aux t (s @ [h1 + h2]) (d @ [h1 - h2])
            | aux _ _ _ = raise Empty
      in  aux l [] []
      end;
  val haar = fn : int list -> int list

For example:

  - haar [1, 2, 3, 4, ~4, ~3, ~2, ~1];
  val it = [~1,~1,~1,~1,~4,~4,20,0] : int list

Joriki 03:43, 20 July 2006 (UTC)[reply]

Other languages with formal specification(?)[edit]

It is unique among widely used languages in that it has a formal specification

Is this completely correct? I understand that the R5RS specification for Scheme is highly formal ("The current language standard is only 50 pages, including a denotational semantics for the language core"). Standard Prolog also seems to have a formal semantics, though only in an "informative" annexe of the standard, apparently due to standards politics (see p. VIII of the Front Matter to Prolog: The Standard: Reference Manual, ISBN 978-3540593041). Both of these languages seem to be fairly widely used, at least by the standard of ML if not Java or C. There are also things like XQuery and RDF which have formal specifications but aren't general-purpose programming languages. (And in the future, ECMAScript 4 will apparently use an extended ML as a definitional interpreter.)

Surely Algol is the standard to reach for when you're looking for an example of a language which had a complete formal specification completed in advance of its first implementation? This reads more like a technical commercial for SML to me. — Preceding unsigned comment added by 217.42.71.124 (talk) 22:02, 9 July 2015 (UTC)[reply]

It's probably worth underlining that it's the formally specified semantics that make ML exceptional, as of course many programming languages at least have formal (or mostly-formal) grammars.

Finally, simply speaking of a "formal specification" could be misleading here. While of course it means (roughly) "mathematically rigorous specification" here, a reader could plausibly read it as "specification formally ratified by some organisation" - think of ISO standards and the like. --138.251.254.113 02:52, 3 March 2007 (UTC)[reply]

R5RS does give a formal semantics only for a subset of the defined language. R6RS has improved this, but still does not cover the entire language. Also, unlike with SML, the formal semantics for Scheme is not normative. Same with Prolog. So maybe the sentence should be rephrased to saying that SML "is unique among general purpose programing languages in that it has a complete, normative formal specification".

Something should also be added about the mechanized correctness proof that was done at CMU over the last years. 77.183.233.185 (talk) 09:22, 2 February 2009 (UTC)[reply]

Naming Conventions[edit]

Some of the examples (especially mergesort) violate standard naming conventions usually used in SML (camel-casing and lower-case value identifiers). This should be made consistent. If nobody objects, I would go ahead changing that. 77.183.233.185 (talk) 09:25, 2 February 2009 (UTC)[reply]

Unexplained operators[edit]

The article makes use of fundamental operators (like ::) that are not explained. This makes the understanding of the article (for non ML programmers) difficult. I should like to add small paragraphs or sentences to cover those operators. I'd be happy to do this but I'm not an ML programmer :) Stkni

Possible bug/omission in one of the code examples[edit]

I tried out the code at http://en.wikipedia.org/wiki/Standard_ML#Module_system in Isabelle which allows to embed ML code between theories. I'm using a development version on Isabelle which uses Poly/ML 5.3.0

The possible bug/omission is at the following line in the code block showing an example of functors

fun bftQ (q: 'a tree queue) : 'a list =

Poly/ML complains with the following error message:

Type constructor (queue) has not been declared

When the above line is changed to

fun bftQ (q: 'a tree Q.queue) : 'a list =

then the error disappears. I believe we have to reference 'queue' through 'Q'. I cannot ascertain whether this error happens for other SML implementations as well, hence I'mm not correcting it in the page. If you feel this is indeed an error, please correct it, else kindly ignore and delete this message.Harsha (talk) 18:46, 14 January 2011 (UTC)[reply]

I think Poly/ML may be toast; at least the link to polyml.org is broken Fairflow (talk) 23:19, 21 October 2013 (UTC)[reply]

History?[edit]

Who created it? Where? How long has it been around? Is there a body responsible for changes and updates to the definition? --ChetvornoTALK 06:35, 12 November 2011 (UTC)[reply]

I second this, particularly the when part.--Prosfilaes (talk) 21:14, 5 February 2013 (UTC)[reply]

Missing parametrized type explanation[edit]

It's not clear what 'a list means. It first appeared in Module system chapter described as parameterized type queue of queues. Here is better explanation:

http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html#Identifiers — Preceding unsigned comment added by 2A00:1028:83D4:42DE:225:22FF:FEF6:293 (talk) 15:17, 10 November 2013 (UTC)[reply]