caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: jtbryant@valdosta.edu
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Stdlib
Date: Tue, 01 Nov 2005 15:08:32 +0900 (JST)	[thread overview]
Message-ID: <20051101.150832.18249533.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <1130803637.488.28.camel@starlight>

From: Jonathan Bryant <jtbryant@valdosta.edu>

> 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? 

Well, you're entitled to your own opinion.
A few years ago we had a few discussions on this list that were worse
than that.
Yet, a result of these discussions is that labeled arguments are much
less intrusive than before.
The explanation is in the tutorial part of the manual. Namely:

   As an exception to the above parameter matching rules, if an
   application is total, labels may be omitted. In practice, most
   applications are total, so that labels can be omitted in
   applications.

That is, you don't have to write labels in your code.
At least not for non-optional arguments.
Optional arguments still require a label.

The examples going with lablGL are heavily labelled, but you are not
forced to write it that way. As another example, GlDraw.vertex takes
labeled and optional arguments, but you can also use
GlDraw.vertex[234] which take tuples.

So I'd suggest you try to use it without labels.
And maybe later you will realize that, when reading your code later
on, your prefer to have labels. Or maybe your opinion won't change
anyway...

On the other hand, I don't know whether lablGL qualifies as complete,
as it only implements openGL 1.2, without extensions.

Jacques Garrigue


  reply	other threads:[~2005-11-01  6:08 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 ` Jacques Garrigue [this message]
2005-11-01 13:54 ` [Caml-list] Stdlib Jon Harrop
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=20051101.150832.18249533.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@yquem.inria.fr \
    --cc=jtbryant@valdosta.edu \
    /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).