On Mon, Apr 4, 2011 at 3:24 AM, Brian Ledger <[email protected]> wrote:
>> Well using Uint keeps the user from passing negative arguments >> plus respects the type of the original options so I thought it >> was necessary. Why do you think it is unnecessary? > Ocaml's implementation of the Int64 type explicitly allocates 64 bits, so > that an Int64 can denote any unsigned integer value and more. Testing for > negative integers is accomplished via the set_uint64 function, which will > raise an exception for negative integer values. But then the full uint64 number range isn't available. >> Besides the previous diferences there is another one between the >> two bindings: ocaml-zmq uses phantom types to prevent the user from calling >> subscribe, unsubscribe and create devices with the wrong kind of socket, >> while Caravan just allows that to happen. > Caravan uses phantom types to represent sockets, contexts, and generic > socket options. I think you are here only describing the socket option type > so I will address that. <snip> I was thinking about the socket type, you don't use phantom types for the socket, the socket is just an opaque type without a type parameter. I'm almost convinced to fork Caravan add whatever is missing, and make an higher level api on top that would be distributed with Caravan (in the spirit of ZMQ utils). The only conditions I make is that the socket types must be interoperable (without casting functions) between the two apis and the uint64 vs int64 thing must be settled. > -- > Brian Ledger > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
