[ocaml-ctypes] Defines, and Structs with platform-specific fields

Daniel Bünzli daniel.buenzli at erratique.ch
Mon Nov 3 16:09:42 GMT 2014


Le lundi, 3 novembre 2014 à 16:45, Jeremy Yallop a écrit :
> Is this approach intelligible? Overly complex? Thoughts welcome.


I think the litmus test for these kind of things is whether you get intelligible type error messages.  Understanding those depends both on having good documentation strings for the types and not overly nested types and/or huge polyvars which seems to look ok here.  

But please don't use too many operators, I'd rather have `future` than `^!`, so when I *read* code like:

future f <*> field "bla"   

then well, I know I'm dealing with the future. Having ^! is one other operator to mix-up with the couple of ones ctypes provides.

Best,

Daniel  




More information about the Ctypes mailing list