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 UAA30885; Tue, 15 Jun 2004 20:15:29 +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 UAA31246 for ; Tue, 15 Jun 2004 20:15:25 +0200 (MET DST) Received: from woodstock.1969.ws (64-215-156-42.eosinc.net [64.215.156.42]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i5FIFNEV017381 for ; Tue, 15 Jun 2004 20:15:24 +0200 Received: (qmail 14077 invoked from network); 15 Jun 2004 18:09:52 -0000 Received: from karl.1969.ws (HELO ?10.3.2.15?) (10.3.2.15) by woodstock.1969.ws with SMTP; 15 Jun 2004 18:09:52 -0000 Message-ID: <40CF3D0C.6060805@1969.ws> Date: Tue, 15 Jun 2004 11:16:44 -0700 From: Karl Zilles Organization: 1969 Communications, Inc. User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Goerzen CC: Richard Jones , caml-list@inria.fr Subject: Re: [Caml-list] OCaml compared as a scripting language References: <20040614095216.GA8184@redhat.com> <20040614162907.GA17265@redhat.com> <40CE99EE.9030105@bik-gmbh.de> <200406151613.i5FGDN7k030987@waco.inria.fr> <20040615171535.GA14773@redhat.com> <20040615173513.GB13863@complete.org> In-Reply-To: <20040615173513.GB13863@complete.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 40CF3CBB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 verbose:01 fprintf:01 ocaml:01 ocaml:01 fewer:02 ported:02 complex:03 wrote:03 perl:03 perl:03 scripting:05 output:05 integer:06 i'd:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk John Goerzen wrote: > My experience has been that OCaml is a lot more verbose than Perl. For > instance, to output an integer to a file, I'd have to do: > > fprintf fd "%d\n" theint; vs. > print FD "$theint\n"; Wow! That's 4 extra characters! I've ported several thousand-line perl scripts to OCaml. My experience is that the resulting scripts are about the same size as the original scripts. They're just infinitely easier to maintain. There is a lot of syntactic sugar in perl (especially for i/o) that makes simple programs very small. As the program grows more complex, the benefits are fewer. ------------------- 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