Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] OCaml popularity
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Tushar Samant <scribble@p...>
Subject: Re: [Caml-list] OCaml popularity
02003-03-11 | Pierre Weis <pierre.weis@inria.fr> 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