Use bigarrays. There is one striking advantage: you need not to make a copy when calling blocking I/O functions. With strings/bytes you need to, because another thread could otherwise move the buffer while you are reading/writing. Gerd Am Sonntag, den 28.02.2016, 19:15 +0000 schrieb Malcolm Matalka: > I'm writing bindings for a library that is just doing I/O and wondering > what the suggested best practice is around using string or bigarray. It > seems like using Bigarray is probably the most versatile interface. > People can decide to do the copying themselves or just use Bigarray > everywhere. > > Are there any other things to consider? Suggestions? > > Thanks, > /Malcolm > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------