Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!diku!sestoft From: sestoft@diku.dk (Peter Sestoft) Newsgroups: comp.lang.functional Subject: Re: Miranda FTP sites Message-ID: <1991Jan11.100048.3121@odin.diku.dk> Date: 11 Jan 91 10:00:48 GMT References: <22307@rouge.usl.edu> <1991Jan10.111559.12440@odin.diku.dk> <27793.278c3bb0@kuhub.cc.ukans.edu> Sender: news@odin.diku.dk (Netnews System) Organization: Institute of Computer Science, U of Copenhagen Lines: 43 kinnersley@kuhub.cc.ukans.edu (Bill Kinnersley) writes: >What makes a language Miranda-like? The main difference between Miranda (TM) and Lazy ML is the syntax. In Miranda the program lay-out has semantics: the off-side rule determines where an expression ends, whereas (Lazy) ML has more Pascal-like conventions, using semicolons similar punctuation. (The off-side rule was suggested by Peter Landin in the sixties). This, and the "list comprehension" notation makes (small) Miranda programs very beautiful. On the other hand, Miranda lacks the modules (structures) and functors of Standard ML. Also, Miranda is implemented by compilation to a fixed set of combinators which are then interpreted, and therefore execution is very slow. But the compiler gives much better (more comprehensible) type error messages than the Chalmers Lazy ML compiler. The off-side rule determines that the definition of g is a local to f in f x = g z where z = 5 g y = 7 but global in f x = g z where z = 5 g y = 7 List comprehensions allow one to write concisely things that would have to be expressed with combinations of map, filter, and concat, otherwise. Thus [f x | xs <- xss; x <- xs; p x] corresponds to concat (map ((map f) . (filter p)) xss) which is less comprehensible (to me, at least). Peter -- Peter Sestoft * sestoft@diku.dk * DIKU, Department of Computer Science University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen O, Denmark Tel: +45 31 39 64 66 * Direct: +45 31 39 33 11/406 * Fax: +45 31 39 02 21