Jump to content

Talk:ML (programming language)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 68.36.46.101 (talk) at 01:55, 19 October 2007 (Overview: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Question RE: expression evaluation

I'm not an ML expert, but I am a student who is currently studying ML for a class. My textbook ("Concepts in Programming Languages" by John Mitchell, who is a current CS Prof. at Stanford) states that ML uses lazy evaluation (see section 5.4.2). Moreover, Poly/ML, which is an open source implementation of Standard ML, uses lazy evaluation:

Poly/ML 5.0 Release
> val i = ref 0;
val i = ref 0 : int ref
> (i:=5; !i<3) andalso (i:=2; !i<3);
val it = false : bool
> !i;
val it = 5 : int
> (i:=5; !i<3) orelse (i:=2; !i<3);
val it = true : bool
> !i;
val it = 2 : int
> (i:=5; !i<6) orelse (i:=2; !i<3);
val it = true : bool
> !i;
val it = 5 : int

Example

Can someone conversant in ML fix the example? It is a cut a paste from the Haskell article and contains some obvious errors. For example, there is reference made to the "third line" but the example is only two lines. Osmodiar 18:55, 13 January 2006 (UTC)[reply]



What's wrong with Basic?

It's simplistic and inexpressive. But Talk:BASIC is the correct place to discuss that. — Haeleth Talk 21:50, 7 June 2006 (UTC)[reply]

Why is SML/NJ categorised under imperative programming languages?

Because it's possible to write a 100% imperative program in it.  :)
It is also categorised under functional programming languages: "ML language family" is a subcategory of "Functional languages", so everything in it is automatically considered functional. — Haeleth Talk 08:29, 25 July 2006 (UTC)[reply]

Overview

The first line has a grammatical error. Since I don't know enough about the subject matter I'm unable to fix it. But the "and therefore..." clause is an incomplete sentence. 68.36.46.101 01:55, 19 October 2007 (UTC)[reply]