Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Marek Kubica <marek@xivilization.net>
To: caml-list@inria.fr
Subject: [Caml-list] [ANN] slacko 0.10.0
Date: Mon, 20 Oct 2014 23:48:13 +0200	[thread overview]
Message-ID: <20141020234813.0d35e543@xivilization.net> (raw)

Hello,

I'd like to announce a new release of Slacko, the OCaml Slack API
binding. This is both an announcement as well as a request for comments
regarding the API.

The homepage is at <https://github.com/Leonidas-from-XIV/slacko>, the
documentation can be read online at
<https://leonidas-from-xiv.github.io/slacko/> and the tarball as well
as release notes can be found on
<https://github.com/Leonidas-from-XIV/slacko/releases/tag/0.10.0>. The
recommended way is to install it from OPAM of course, which already
carries the 0.10.0 release.

I've listened to the suggestions by Malcolm, Gabriel and Jaques as well
as Drup so the methods are not longer "stringly" typed, each function
supports parameters that make more sense, like user/group/channel
types, booleans, integers etc. The results are changed from a huge
monolithic type to individual polymorphic variants composed of smaller
types.

But some questions remain: I have a number of types and conversion
functions (foo_of_string mostly). These can validate the input
(checking if the format is correct or whether the input is not too
long) and most likely should. But what is the preferred OCaml way of
handling failure to convert? I could use exceptions but that seems
kinda type unsafe to me. I could use option types, but that might make
for some clunky conversions. Any ideas?

Also there are errors like `Msg_too_long. I'm currently exposing them,
because the API might throw them. But when doing validation inside my
binding, these errors can't really happen, since I validated
beforehand. I think that these can be filtered out (since the length
limit is static and if it changes, the library can be updated), but if
anyone has a different perspective, please speak up.

Looking forwards to comments!

Oh and I ported from the Camlp4 Lwt macros to PPX. Was super easy and
worked like a charm, zero issues.

regards,
Marek

                 reply	other threads:[~2014-10-20 21:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20141020234813.0d35e543@xivilization.net \
    --to=marek@xivilization.net \
    --cc=caml-list@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