Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] ocaml complexity
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Arturo Borquez <aborquez@a...>
Subject: Re: [Caml-list] ocaml complexity
On Mon, 11 June 2001, Pierre Weis wrote:

>
> Objective Caml is one of a very few sucessful software provided by
> INRIA. Hence it is politically important for INRIA (read it as ``it is
> an important argument for INRIA to get funding), hence INRIA is not
> likely to abandon its support for Caml (also remember that more and
> more INRIA's software is written in Caml!).
> 
I must add to this that after three month evaluating and testing some server apps at my company, we have decided as part of a major improvement (that includes a new DB model) to port ALL our propietary server apps (mainly C/C++) to OCaml. The survey we did show that OCaml productivity is 5 to 10 times C/C++, runtime and memory perfomance good enough to put it in production. Also we have found that the core language / libraries supplied fullfill almost our needs. We envise OCaml as a part of the key to provide customers satisfaction (quality services and requirement responsiveness). The lack of 'market programmers' in OCaml certainly is an issue, so we started doing capacitation investments (3 month 45 min/day/programmer) that are marginal in the long term and payed in excess with the benefits of the language. As OCaml isn't already a 'popular' language we are confident that these guys will stay with us as they earn more money with less effort and enjoy programming in OCaml, !
they don't want back to boring C/C++.

My experience 'teaching' Ocaml to C/C++ programmers are:

1) Remark the difference between imperative vs FP. The analogy of a spreadsheet or a calculator (without parens -> imperative) (with parens -> FP) is very usefull, the programm is an expression to be evaluated not a sequence of instructions. It seems me that this is the main obstacle at the begining to switch from the 'sequence thinking' to the 'expression thinking'.

2) Use a blackboard and show a piece of code known by the audience at the left side in C/C++ and at the right side in OCaml. Take all the time to disscuss the differences. Even more is better if you show a gentle trasition from imperative to FP style for the example regarding not to obfuscate with too much abstraction. Do it trivialy and simple as possible.

3) Do not introduce explicit typing annotations or partial function application at the begining. Let beginers to practice and be confident with type inference. 

4) Stay in the core language and libraries for a while (don't hurry). Even some functions exercised were polymorphic by nature don't distract attention.

5) Introduce the typing system, modules and labels at a second stage. Explain polymorphism partial function applications currying, recursions. Put the accent in FP style.

6) Develop a full fledged known application step by step. Show how you can improve starting with the design and the befefits of coding OCaml. It is very important sychological issue to transmit confidence to programmers, be patient.

7) Continuity. Give some real apps to code to do in pairs programmers and give them continuos time to do it (do not disturb them with other stuffs and support them as they need).

8) As programmers get skilled revise old code, show the enhancements that could be made. Let them to discover and exercise the advanced features of the language. I am not a fun of OOP and I try to avoid OOP code in our apps, but it isn't a religion, certainly I have used LablGtk. 

OCaml is so good that even if it would freezed by INRIA we plan to use it as much we can. I am not allowed by my company to reveal some commercial details but I can inform that we serve about 1000 customers client workstations along the country, at a rate of 80000 transaction/day. I have no doubt upon the success of this proyect and surely it will open the door to other projects with OCaml.

Best Regards
Arturo Borquez (Chile).


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
-------------------
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