Penguin

Differences between version 15 and predecessor to the previous major change of ML.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 15 Last edited on Thursday, February 20, 2003 5:04:31 pm by GlynWebster Revert
Older page: version 14 Last edited on Sunday, February 16, 2003 6:06:08 pm by GlynWebster Revert
@@ -132,10 +132,10 @@
  
 and creates an abstract data type module for sets of type ''t''. [String | http://caml.inria.fr/ocaml/htmlman/libref/String.html] contains the 
 necessary definitions (t = string) so we can use that: 
  
- # __module__ String_Set = Set.Make(String);;  
- ''module String_Set :'' 
+ # __module__ !StringSet = Set.Make(String);;  
+ ''module !StringSet :'' 
  ''sig'' 
  ''type elt = string'' 
  ''and t'' 
  ''val empty : t'' 
@@ -149,16 +149,29 @@
  
 [6] 
 !!!ML is very good general purpose programming language 
  
-''(more to say. ..)'' 
+The type system means that even when I just sit down and hack, I get good quality code.  
+  
+* I can leave out type definitions. This lets me program in the succinct, flexible way I can in [Python], without the let-down of having all my type errors pop up a runtime.  
+  
+* The type system is very expressive. It encourages a style of programming where you think about your data, what it consists of and how you will transform it. Programs designed by type tend to be very modular, they almost have to be by definition.  
+  
+* The type system is very exact. It allowed the compiler to spot many big, logical errors at compile time, and well as the little nit-picky syntactic ones.  
+  
+ ''(more to say..)'' 
  
  
 [7] 
 !!!Pattern Matching 
  
-''(more to say ...)'' 
+Pattern matching is ML's strength. ML has an expression that is halfway between [C]'s__switch__ and declaration statements. In SML it is called __case__ and in Ocaml it is called __match__. Instead matching a value with single constants, like the __switch__ statement, __match__ can match values of any complexity by example, and select parts of the value to assign to variables as it does it.  
+  
+__Match__ statements are very clear and compact.  
+  
+ ''(example to come ...)'' 
  
+Pattern matching is a very useful in general, but it is particularly handy in programs that manipulate complex tree-structured data, such as the parse trees in compilers. The [original ML language| http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?ML] was designed by someone who needed to do a ''lot'' of automated algebra on statements of symbolic logic.  
  
 [8] 
 !!!SML standard 
  
@@ -196,13 +209,14 @@
 !!!Standard Libraries 
  
 The [SML Basis Library | http://cm.bell-labs.com/cm/cs/what/smlnj/doc/basis/pages/sml-std-basis.html] is said to be very well designed. 
  
-The Basis library is indeed very well designed, but for SML/NJ (one of the major SML compilers) it is poorly documented, making it somewhat difficult to use. --GianPerrone 
+'' The Basis library is indeed very well designed, but for SML/NJ (one of the major SML compilers) it is poorly documented, making it somewhat difficult to use. --GianPerrone'' %%%  
+''The Basis Library pages I've linked to above seem adequate to me. Or those not what you are talking about? --GlynWebster''  
  
 Ocaml's library is divided into: a [core library |http://caml.inria.fr/ocaml/htmlman/manual033.html], types and function available at all times; an implementation independent [standard library | http://caml.inria.fr/ocaml/htmlman/manual034.html], modules that can be imported; and set of [optional libraries | http://caml.inria.fr/ocaml/htmlman/index.html#p:library] that are either implementation dependent or special purpose. 
  
  
 [13] 
 !!! Third-Party Libraries 
  
 [The Caml Link Database | http://www.npc.de/ocaml/linkdb/] and [The Hump | http://caml.inria.fr/humps/index.html] are the central repositories for [Ocaml] software.