From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA21842; Sat, 15 Mar 2003 02:43:58 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA22479 for ; Sat, 15 Mar 2003 02:43:57 +0100 (MET) Received: from mail.xnet.com (quake.xnet.com [198.147.221.67]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2F1htX17008; Sat, 15 Mar 2003 02:43:55 +0100 (MET) Received: from typhoon.xnet.com (typhoon.xnet.com [198.147.221.66]) by mail.xnet.com (8.11.6+Sun/XNet-3.0R) with ESMTP id h2F1hsQ08370; Fri, 14 Mar 2003 19:43:54 -0600 (CST) Received: by typhoon.xnet.com (Postfix, from userid 10045) id F238638699; Fri, 14 Mar 2003 19:43:53 -0600 (CST) Date: Fri, 14 Mar 2003 19:43:53 -0600 From: Tushar Samant To: Pierre Weis Cc: caml-list@inria.fr Subject: Re: [Caml-list] OCaml popularity Message-ID: <20030315014353.GL18288@pobox.com> References: <005d01c2e76f$92d0f8b0$2713f9ca@WARP> <200303111023.LAA09578@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200303111023.LAA09578@pauillac.inria.fr> User-Agent: Mutt/1.3.28i X-Spam: no; 0.00; caml-list:01 pierre:01 weis:01 inference:01 avoids:01 struct:01 pants:99 ocaml:01 caml:01 writes:01 constructors:01 reasoning:02 modules:02 enforce:02 arbitrary:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 02003-03-11 | Pierre Weis writes: > have to learn it. This may be the main drawback of Objective Caml: > there is no ``Objective Caml for dummies''. That may be the price to Well said. I have had haphazard formal training in programming, and until I arrived at the idea of informally reasoning out type inference I essentially could not go beyond print_string(). This is a type of thing which can go in "Ocaml for Dummies". As another example, take type constructors. Here is their first occurrence in the proposed O'Reilly book: In contrast with tuples or records, which correspond to a Cartesian product, the declaration of a sum type corresponds to a union of sets. Different types (for example integers or character strings) are gathered into a single type. The various members of the sum are distinguished by -constructors-, which support on the one hand, as their name indicates, construction of values of this type and on the other hand, thanks to pattern matching, access to the components of these values. To apply a constructor to an argument is to indicate that the value returned belongs to this new type. A programmer who is constantly asked to parse xml, make database queries etc at work is not going to be sympathetic to this. And no considerations of why other ways of doing it lead to a stronger or weaker system are going to sway him. But a Dummies book, hand- waving a constructor away as a flag or label, might. The third and last example is the introduction of structures in the reference manual: A primary motivation for modules is to package together related definitions (such as the definitions of a data type and associated operations over that type) and enforce a consistent naming scheme for these definitions. This avoids running out of names or acci- dentally confusing names. Such a package is called a -structure- and is introduced by the struct...end construct, which contains an arbitrary sequence of definitions. The structure is usually given a name with the module binding. Since C programmers mean something else by structure, it would be nice if there was a Dummies book which said that a structure is a namespace which may contain types, values and exceptions. Perhaps it's not--who cares, that's merely the truth about it. A Dummies book abandons the responsibility of being truthful all the time, and hence manages to communicate with harried, seat of the pants programmers. You know that it's just this type--myself included-- which stands the most to benefit from a safe fast language. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners