caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sergey Goldgaber <sgoldgaber@yahoo.com>
To: Pierre Weis <weis@latour.inria.fr>
Cc: William Lovas <wlovas@stwing.upenn.edu>, Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] poll - need for a good introductory OCaml book (LONG)
Date: Tue, 18 Mar 2003 01:47:53 -0800 (PST)	[thread overview]
Message-ID: <20030318094753.37572.qmail@web11007.mail.yahoo.com> (raw)
In-Reply-To: <20030318093223.I30420@latour.inria.fr>

--- Pierre Weis <weis@latour.inria.fr> wrote:
> 
> Have you had a look to
> 
> http://pauillac.inria.fr/caml/Examples/oc/eng.html
> 
> There are there a lot of examples from simple to extremely advanced,
> from simple command-line a.out style to rather involved GUI
programming
> for an interactive Tetris game.
> 
> Some of the examples are equipped with their C equivalent for you to
> compare with, some other have both an imperative and recursive
versions, and
> still other examples have 4 or 5 implementations from simple to higly
> functional style.
> 
> I would be glad to incorporate other examples that you would think
> more appropriate for the beginners and/or comments or explanations
you
> could have.

Yes, many thanks for making this code available.  I can see that it
must have taken great dedication to write.

I looked at these examples at the start of my OCaml adventures, and
actually found the first few examples in the "basic" section to be
enormously useful, because  you kept at least a 1:1 ratio of comments
to lines of code, explaining even little things such as what
Sys.interactive meant and how to compile the code.  That was extemely
helpful.

However, after a few examples that practice quickly dropped to few and
sometimes virtually no comments (as with explode, reverse_stdin, or
solitaire program, for example).  This would be fine if the code was
accompanying a text where the code was explained in detail.  But, on
their own, without very heavy commenting explaining not only the syntax
but the algorithms, the examples are of limited use to someone who
doesn't already know OCaml or another functional language.

Now, however, after going through about four OCaml tutorials, playing
with some toy problems on my own, and having read a full quarter of the
Cousineau and Mauny text (and having followed through on thier
exercises), I think I may be ready to tackle the examples again, which
are making much more sense now then when I first started.

On a related note, I think it might be of benefit to mention things I
remember finding particularly confusing when I first started out:

 - Where semicolons are and are not used is very inconsitent in
OCaml...
   some statements are delimited by semicolons, others not...
   I was once very confused until someone pointed out that the last
statement
   in a block of code should not contain a semicolon (unlike the rest).
   Coming from a C background this took some getting used to.

 - Another confusing thing was why you needed an "in" section at all.
   I was used to execution starting as soon as you entered a function.

 - Of course, syntax was really a minor issue compared to getting used
to
   the functional style and recursion.  Especially how some algorithms
are
   arrived at and how they work.  I am still wrestling with these
issues.

Hope that helps.  And thanks again for your work!


  --Sergey


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-------------------
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


       reply	other threads:[~2003-03-18  9:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030318093223.I30420@latour.inria.fr>
2003-03-18  9:47 ` Sergey Goldgaber [this message]
2003-03-16  0:44 isaac gouy
  -- strict thread matches above, loose matches on Subject: below --
2003-03-14  8:12 Sergey Goldgaber
2003-03-14  9:51 ` Noel Welsh
2003-03-14 10:36   ` Sergey Goldgaber
2003-03-14 10:47     ` Noel Welsh
2003-03-14 11:13       ` Sergey Goldgaber
2003-03-14 11:47         ` Noel Welsh
2003-03-14 12:59         ` Geoff Wozniak
2003-03-14 11:20     ` William Lovas
2003-03-14 11:38       ` MikhailFedotov
2003-03-14 12:16       ` Sergey Goldgaber
2003-03-14 18:57         ` Richard W.M. Jones
2003-03-14 14:17       ` Guido Kollerie
2003-03-14 14:52 ` Fred Yankowski
2003-03-14 17:24 ` Brian Hurt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030318094753.37572.qmail@web11007.mail.yahoo.com \
    --to=sgoldgaber@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=weis@latour.inria.fr \
    --cc=wlovas@stwing.upenn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).