From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 3ADD0BC75 for ; Wed, 23 Feb 2005 00:19:04 +0100 (CET) Received: from first.in-berlin.de (dialin-145-254-062-172.arcor-ip.net [145.254.62.172]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1MNJ2Be032736 for ; Wed, 23 Feb 2005 00:19:03 +0100 Received: by first.in-berlin.de (Postfix, from userid 501) id A987FAED49; Tue, 22 Feb 2005 11:54:34 +0100 (CET) Date: Tue, 22 Feb 2005 11:54:34 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OCaml && COCOA-Environment (Mac-OS-X/GUI) Message-ID: <20050222105434.GA571@first.in-berlin.de> References: <20050205000208.GB1364@first.in-berlin.de> <3a2f4a1305020508377ec6ddaf@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Miltered: at concorde with ID 421BBDE6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 ocaml:01 wrote:01 resurrect:01 o'caml:01 runtime:01 ocaml:01 compilation:01 developement:01 compile-time:01 statically:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Sat, Feb 05, 2005 at 02:51:20PM -0500, Mike Hamburg wrote: [...] > knowledge could resurrect it. The existing code is not strongly typed: > you can attempt to pass the wrong number or type of arguments to a > method, and it will raise an O'Caml exception instead of rejecting it > at compile time. [...] The big advantage in flexibility is the big disadvantage in secure programming: The late binding of Objective-C seems to be a good thing for many people and many tasks, because runtime loading of code means a lot of flexibility. But as I started to jump into ObjC in more detail during the last few weeks, with one of my first examples I run into that advangage's traplike behaviour: Compiling code was done without any errors/warnings. After running the code, I got the message that the program could not run one of the methods... ...this was in a really small example. And this is, where the static behaviour of OCaml has told me that something was wrong. When extrapolate this late binding problem to bigger, big, huge, very huge code base, then it is clear to me, what aproach will yield to safer programming and faster programming (because you don't need to test the running program to find, what you also have found earlier - during compilation time). Nevertheless yields ObjC-programming (because of it's flexibility) very short development times. But Ocaml also yields to rapid development. :) One big advantage - at least in the COCOA-environment - is, that ObjC can use a lot of powerful libraries. This also is a reason for rapid developement, so it's not only the language itself. OK, long words for what I started to say here: The problem with exceptions instead of compile-time errors may be caused by using the id-type instead of statically using specialized types for the object-allocation?! Maybe it would be a good idea to write an OCaml-program that generates the glue-code between OCaml and ObjC/COCOA?! Ciao, Oliver