Re: Warnings in ocaml

From: Ching-Tsun Chou (ctchou@mipos2.intel.com)
Date: Mon Feb 22 1999 - 19:33:44 MET


Date: Mon, 22 Feb 1999 10:33:44 -0800 (PST)
Message-Id: <199902221833.KAA21124@zws197.sc.intel.com>
From: Ching-Tsun Chou <ctchou@mipos2.intel.com>
To: christo@nextsolution.co.jp
Subject: Re: Warnings in ocaml

   I copied from SML and defined a procedure "ignore":

     let ignore k =
       let _ = k in ()

   so now I would write:

     ignore (f x y); ...

How about instead of writing:

        (f x y) ; (g z w) ; ...

write:

        let _ = (f x y) in
        let _ = (g z w) in
        ...

In fact, I found it scarcely necessary to use ";" these days even when
I was doing imperative programming.

Cheers,
- Ching Tsun

=====================================================================
  Ching-Tsun Chou E-mail: ctchou@mipos2.intel.com
  Intel Corporation Tel: (408) 765-5468
  3600 Juliette Lane, SC12-401 Fax: (408) 653-7933
  Santa Clara, CA 95052, U.S.A. Sec: (408) 653-8849
=====================================================================



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:20 MET