caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Stdlib
Date: Tue, 1 Nov 2005 14:54:29 +0100	[thread overview]
Message-ID: <200511011354.29940.jon@ffconsultancy.com> (raw)
In-Reply-To: <1130803637.488.28.camel@starlight>

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


  parent reply	other threads:[~2005-11-01 14:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01  0:07 Stdlib Jonathan Bryant
2005-11-01  6:08 ` [Caml-list] Stdlib Jacques Garrigue
2005-11-01 13:54 ` Jon Harrop [this message]
2005-11-01 15:30 ` lablgl (was Re: [Caml-list] Stdlib) Daniel Bünzli
2005-11-01 15:45   ` Jonathan Bryant
  -- strict thread matches above, loose matches on Subject: below --
2005-10-31 14:41 Stdlib Jonathan Bryant
2005-10-31 17:20 ` [Caml-list] Stdlib skaller
2005-11-01  0:11   ` Jonathan Roewen
2005-11-01  8:17     ` skaller
2005-11-01 16:02 ` Brian Hurt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511011354.29940.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).