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 RAA16775; Wed, 22 Oct 2003 17:30:15 +0200 (MET DST) 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 RAA10581 for ; Wed, 22 Oct 2003 17:30:14 +0200 (MET DST) Received: from nemerle.org (lilith.ii.uni.wroc.pl [156.17.4.7]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h9MFUA129169 for ; Wed, 22 Oct 2003 17:30:13 +0200 (MET DST) Received: from malekith by nemerle.org with local (Exim 4.24) id 1ACKw5-0001gm-TJ for caml-list@inria.fr; Wed, 22 Oct 2003 17:30:10 +0200 Date: Wed, 22 Oct 2003 17:27:44 +0200 From: Michal Moskal To: caml-list@inria.fr Subject: Re: [Caml-list] OCaml wishlist Message-ID: <20031022152744.GA16327@roke.freak> Mail-Followup-To: caml-list@inria.fr References: <20031022095952N.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 wishlist:01 jacques:01 indentation:01 gmisc:01 gmain:01 dangling:01 semicolon:01 foo:01 baz:01 qux:99 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Oct 21, 2003 at 09:52:17PM -0500, Brian Hurt wrote: > On Wed, 22 Oct 2003, Jacques Garrigue wrote: > > > Of course you have to be careful: you can shoot yourself in the foot > > with wrong indentation: > > > > let quit _ = > > let icon = GMisc.image () in > > if !test_id = 0 then (GMain.Main.quit (); false) else > > icon#set_stock `DIALOG_QUESTION; > > icon#set_icon_size `DIALOG; > > [...] > > > > In this case you're just going to jump over icon#set_stock... > > This is a classic problem with dangling-elses, and you see it in C as > well: > > if (x == 3) > y = 7; > z = 8; It's dangling semicolon problem :-) if foo then bar else let x = baz in qux; quxx is different from: let x = baz in if foo then bar else qux; quxx let in the beginning changes meaning of semicolon. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- 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