[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] How to implement protocols?
>ÂSeeÂhttp://www.cis.upenn.edu/~bcpierce/papers/modules-icfp.psÂfor more on this. The alternative it provides is sharing-by-specification. This requires your implementations to pick a concrete instance of the module you're abstracting over (for instance in slide 42, the implementation of B has "A:AI = A"). I guess the point is you can swap out the concrete A that has been selected, but is there a practical way to do that in OCaml? AFAICT this would require a link-time hack. Also, this approach pollutes all of your signatures, so I don't immediately see it as a win, but I'd be curious to see some real world examples.ÂAre there any OCaml projects using this approach? FWIW, my feeling is that the Cohttp code is hard to read not because of the functorization, but the lack of it. A deliberate choice was made to make the Lwt and Async versions non-uniform to support the differing styles of those two libraries. If it was fully functorized, there would be a single signature and single implementation that could be more easily followed. On Fri, Nov 13, 2015 at 10:43 AM, Daniel BÃnzli <daniel.buenzli@xxxxxxxxxxxx> wrote: Le vendredi, 13 novembre 2015 Ã 15:22, Hannes Mehnert a Ãcrit : _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |