From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 82AB47EC6E for ; Tue, 17 Dec 2013 19:57:42 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.216.173 as permitted sender) identity=mailfrom; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qc0-f173.google.com) identity=helo; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-qc0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4DAH2dsFLRVditlWdsb2JhbABZhBe4aoEXCBYOAQEBAQcNCQkSKoIlAQEBAwFAARsdAQMBCwYFCzsiAREBBQEcBhOHbwEDCQikf4xagwmNJwoZJw1khhgRAQUMjiNjB4Q2BIlDjlOQJxgphHUe X-IPAS-Result: Ai4DAH2dsFLRVditlWdsb2JhbABZhBe4aoEXCBYOAQEBAQcNCQkSKoIlAQEBAwFAARsdAQMBCwYFCzsiAREBBQEcBhOHbwEDCQikf4xagwmNJwoZJw1khhgRAQUMjiNjB4Q2BIlDjlOQJxgphHUe X-IronPort-AV: E=Sophos;i="4.95,502,1384297200"; d="scan'208";a="49428618" Received: from mail-qc0-f173.google.com ([209.85.216.173]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Dec 2013 19:57:41 +0100 Received: by mail-qc0-f173.google.com with SMTP id m20so5281760qcx.18 for ; Tue, 17 Dec 2013 10:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=C5e8RsCqLneWntPgqHZ1rZmYeynTdUGD2Uqi5KKLKk4=; b=ZVD4ScYxL8chzSU6QpJw17RqdBHvP74ohGVnAcd69MMEg3cLr08ZP5+9bQwYlzaDn6 irdZMxsioDBLQPs4hZPf/Pc2GphwkWYrBiZduJUXC6zDbRkQdAuMoWguE93ajYcInaSK 1CxV0Dwb4UBq0swmeYSe7XMT0AR2WJB7lO4sfrCgg8/slU574gzLFs2YbQuSbsXplzb6 kP5nvnY71dMwUSdIfC/I/Cszzl63NnSBrYSeD/BqOdTAJVeYCF18cTXjYIW2w5djMJFK h6RUt6gIa8gCl/Jn0riw3l/qT+PPxRkJ63PE0r5Gxdix1UwcZqLkOxHE3dPZAncKJPUu GLAQ== X-Received: by 10.224.45.197 with SMTP id g5mr45411664qaf.2.1387306660561; Tue, 17 Dec 2013 10:57:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.8.8 with HTTP; Tue, 17 Dec 2013 10:57:20 -0800 (PST) In-Reply-To: <1C9496037B6149EC970D65C3BFA490F7@erratique.ch> References: <4DDEBB7487B641C0834F09D522EA9918@erratique.ch> <1C9496037B6149EC970D65C3BFA490F7@erratique.ch> From: Ashish Agarwal Date: Tue, 17 Dec 2013 13:57:20 -0500 Message-ID: To: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Cc: caml list Content-Type: multipart/alternative; boundary=001a11c35d14b28d1604edbf8055 Subject: Re: [Caml-list] SDL2 bindings, testers and feedback welcome --001a11c35d14b28d1604edbf8055 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Tue, Dec 17, 2013 at 12:47 PM, Daniel B=FCnzli wrote: As for using options instead of this result type I really want to be able > to distinguish at the type level between the following two functions (see > the corresponding C documentation): > The desire to distinguish between a successful non-result vs an error is reasonable, but it's hard to know where to draw the line. Is it an error for Map.find to not find the item you asked for? Maybe. Maybe not. I would just say consider that introducing a new type has a cost. Your users have to learn one more thing and, in this case, get embroiled in yet another monad. > * What is the T in Tsdl? I don't see any T on the SDL website. > > Thin (bindings to) SDL. Ugh. I could have used Sdl but I don't like to take ownership of toplevel names > that are used in other settings. > Admirable, but if you're defining a library that binds to a C library, I think it is reasonable to take that name. We rarely have multiple OCaml libraries that bind to the same C library. In this case, the library name could be sdl or ocaml-sdl (or sdl2 or ocaml-sdl2). I usually don't like adding "ocaml-" to library names because it is silly; of course it is an ocaml library. However, when binding to a C library, it makes some sense to distinguish between the OCaml and original C libraries. Why not. Maybe I should prefer b_array which is used by Gg. > I'd have the same criticism. It is the single letter I don't like. > > > I don't like random single letters in names, which is also a problem in > your Vg and Gg project names. > > It's not random ! It's short cryptic acronyms. Vector graphics, geometry > and graphics=85 > I misspoke. What I meant is: I don't like short cryptic acronyms. They appear random to me because I don't know what they mean. --001a11c35d14b28d1604edbf8055 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
On T= ue, Dec 17, 2013 at 12:47 PM, Daniel B=FCnzli <daniel.buenzli@er= ratique.ch> wrote:

As for using options instea= d of this result type I really want to be able to distinguish at the type l= evel between the following two functions (see the corresponding C documenta= tion):

The desire to distinguish between a succes= sful non-result vs an error is reasonable, but it's hard to know where = to draw the line. Is it an error for Map.find to not find the item you aske= d for? Maybe. Maybe not. I would just say consider that introducing a new t= ype has a cost. Your users have to learn one more thing and, in this case, = get embroiled in yet another monad.=A0


> * What is the T in Tsdl? I don't see any T on the SDL website.

Thin (bindings to) SDL.

Ugh.


I could have used Sdl but I don't like to take ownership of toplevel n= ames that are used in other settings.

A= dmirable, but if you're defining a library that binds to a C library, I= think it is reasonable to take that name. We rarely have multiple OCaml li= braries that bind to the same C library. In this case, the library name cou= ld be sdl or ocaml-sdl (or sdl2 or ocaml-sdl2). I usually don't like ad= ding "ocaml-" to library names because it is silly; of course it = is an ocaml library. However, when binding to a C library, it makes some se= nse to distinguish between the OCaml and original C libraries.


Why not. Maybe I should pref= er b_array which is used by Gg.

I'd have the same criticism. It is the= single letter I don't like.
=A0

> I don't like random single letters in names, which is also a probl= em in your Vg and Gg project names.

It's not random ! It's short cryptic acronyms. Vector graphic= s, geometry and graphics=85

I misspoke.= What I meant is: I don't like short cryptic acronyms. They appear rand= om to me because I don't know what they mean.

--001a11c35d14b28d1604edbf8055--