From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 7C5B0BC48 for ; Tue, 5 Apr 2005 15:49:09 +0200 (CEST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j35Dn8DT008853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 5 Apr 2005 15:49:09 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1DIoQU-0004mZ-V1 for caml-list@yquem.inria.fr; Tue, 05 Apr 2005 13:49:07 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: some comments on ocaml{lex,yacc} from a novice's POV Date: Tue, 5 Apr 2005 14:49:38 +0100 User-Agent: KMail/1.7.1 References: <49464.202.164.198.46.1112355123.squirrel@www.ivorykite.com> <200504041051.07270.jon@ffconsultancy.com> <87mzsdv3gb.fsf@nagash.wacky> In-Reply-To: <87mzsdv3gb.fsf@nagash.wacky> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504051449.39133.jon@ffconsultancy.com> X-Miltered: at concorde with ID 42529755.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 grammar:01 undecided:01 ocaml:01 run-time:01 lexer:01 statically:01 statically:01 frog:98 wrote:01 dynamically:01 typing:01 typing:01 conflicts:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Tuesday 05 April 2005 13:00, Geoff Wozniak wrote: > When I am developing software, I often find that at the beginning, static > typing is a burden Note that, in this case, I was referring to the detection of grammar conflicts and not static type checking. > that I would rather not be bothered with for the simple > reason that I don't know what types are to be used. Later in development, > once I know more about my problem space, I will migrate to using some > language that uses a static (preferably strong) type system. I think this is very interesting. Someone else recently expressed this view to me. Personally, I'm undecided. I must say that I do occasionally resort to Mathematica (which is "kind of" dynamically typed) instead of OCaml for simple programs. However, I think this is not because of the typing but, rather, because Mathematica provides many more features in some areas (e.g. pattern matching). Also, in most cases I end up regretting my decision and resort to OCaml. For example, I recently tried to write programs to compute the number of unique posters per month on the two caml lists. I initially tried this in Mathematica because it is more lax and I thought it would let me knock up such a program more quickly. However, having written several versions which didn't work (mostly bailing with the equivalent of run-time type errors) I ended up using a lexer written in OCaml. > Saying some programming tool isn't nice because it isn't "statically > checked" is short-sighted and I'd rather not see a novice come away with > the impression that if a language/tool is not statically checked, it's > somehow inferior. Can you give an example where dynamic typing has helped you to prototype a program more quickly than you could have done with static type checking? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists