From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 755E5D45F for ; Tue, 1 Nov 2005 15:17:34 +0100 (CET) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA1EHX9Y032268 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 1 Nov 2005 15:17:34 +0100 Received: from [80.229.56.224] (helo=chetara) by ptb-relay01.plus.net with esmtp (Exim) id 1EWwxB-0001pM-HC for caml-list@yquem.inria.fr; Tue, 01 Nov 2005 14:17:33 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Stdlib Date: Tue, 1 Nov 2005 14:54:29 +0100 User-Agent: KMail/1.7.2 References: <1130803637.488.28.camel@starlight> In-Reply-To: <1130803637.488.28.camel@starlight> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511011354.29940.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 436778FD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 stdlib:01 ocaml:01 lablgl:01 api:01 ocaml:01 syntax:01 stubs:01 api:01 variants:01 lablgl:01 frog:98 wrote:01 polymorphic:01 imho:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Tuesday 01 November 2005 00:07, Jonathan Bryant wrote: > On another note, I would love to do this other project in OCaml, but it > is OpenGL intensive (read: based) and LablGL drives me nuts. The named > argument thing drives me up the wall because it's more information that > I don't want to have to learn and internalize. If the author of that > package reads this list, then I apologize. You've done a fantastic job > of mapping the API, but I really do not like the OCaml syntax for both > Labeled and Optional arguments in general. Does anyone know of an > OpenGL package that is /complete/ and /not/ labeled? There is, of > course, the option of writing a module/set of modules that use the > existing C stubs an are not labled, but that would be a last-ditch > effort. You can omit the labels in most cases. I've done my fair share of OpenGL programming, both from C/C++ and from OCaml, and I was quite surprised to hear that Jacques has had complaints about his API. The C interface is flat and unlabelled because C doesn't support hierarchical interfaces, polymorphic variants and labelled/optional arguments. There is still room for improvement with lablGL but the API alone is a significant step in the right direction, IMHO. After all, if you have an aversion to labelled arguments you can always omit the labels. :-) I would value safety above completeness but writing a safe (and still efficient) interface to OpenGL is difficult. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists