Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] [ANN] slacko 0.10.0
@ 2014-10-20 21:48 Marek Kubica
  0 siblings, 0 replies; only message in thread
From: Marek Kubica @ 2014-10-20 21:48 UTC (permalink / raw)
  To: caml-list

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-20 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20 21:48 [Caml-list] [ANN] slacko 0.10.0 Marek Kubica

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox