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 AAA31681; Sat, 9 Jun 2001 00:14:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA32143 for ; Sat, 9 Jun 2001 00:14:51 +0200 (MET DST) Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f58MEnn24135 for ; Sat, 9 Jun 2001 00:14:50 +0200 (MET DST) Received: from checkerlap.d6.com ([64.160.53.43]) by mta7.pltn13.pbi.net (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0GEM007I5TS77E@mta7.pltn13.pbi.net> for caml-list@inria.fr; Fri, 8 Jun 2001 15:14:37 -0700 (PDT) Date: Fri, 08 Jun 2001 15:16:16 -0700 From: Chris Hecker Subject: Re: Why is Ocaml better than Java (WAS: [Caml-list] ocaml complexity) In-reply-to: X-Sender: def6@shell16.ba.best.com To: Brian Rogoff , Mattias Waldau Cc: caml-list@inria.fr Message-id: <4.3.2.7.2.20010608150306.029ed380@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset="us-ascii" References: Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >C derived languages are relatively flat; yeah you can have nested scopes >but you can't nest function definitions. I hate that. Pascal derived >languages are much nicer in this respect, but they always have >restrictions on what you can do with functions. So ML style closures will >be a lot nicer than Java style closures faked with objects since you don't >have to explicitly make the local variables into arguments. Unless you want local types (or local exceptions for parameterized Breaks, like we discussed previously) to go with your local functions, in which case you have to wrap them in a local module, but you can't local open, so it's a lot like a nested class syntax-nastiness-wise, and you can't have record fields with the same name anyway, etc. :) In some sense, you trade heavyweight functions in C++ for heavyweight types in OCaml. I won't defend that statement particularly strongly though, so don't bother attacking it with vigor. :) > So is C++ (sorry Chris, couldn't resist ;-). I certainly think C++ is a pile, myself. My point with that other comment was that I think "alternative language people" (whatever that means) like to bash C++ to the point where it becomes a habit, rather than it staying an engineering analysis of a different solution's strengths and weaknesses. Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr