Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml && COCOA-Environment (Mac-OS-X/GUI)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] OCaml && COCOA-Environment (Mac-OS-X/GUI)
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