Re: pengines extension to html_requires
Torbjörn Lager <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CA+Y3JZgKo8RLkQdqRjZTNyaVcytEytdkDU_HNcM9sWw8Pgn41g@mail.gmail.com> |
On Sun, Feb 9, 2014 at 1:37 PM, Jan Wielemaker <[email protected]> wrote: > On 02/09/2014 01:23 PM, Torbjörn Lager wrote: >> I agree. I'm not sure which ones though. Perhaps pengine_send/3? >> Hmm, pengine_pull_response/2 is special. Normally, it won't be used by >> application programmers, but since the JS lib uses it, and since you > > But the js lib uses it though the HTTP handlers that are in the same > module. No need to export them, is there? No, you are right. >> often need it if you want to program a high-level predicate (e.g. a >> new kind of event loop) on top of the core predicates, it cannot be >> made private. > > Yes, I think you want to be able to program pengine_rpc/3 if it would > not have existed. That indicates you need pengine_event/1 and > pengine_pull_response/2 exported. Yes. >> Do you have any other predicates in mind that can be made private? > > A quick glance most indicates pengine_send/2,3. Also because you can > simply upset the protocol by sending other terms to the pengines. I'll > remove them from the exports. ... > P.s. I would also not be against removing almost all the versions > without options. That almost halves the number of exported > predicates and thus makes it quicker to assess the functionality > of the interface. Anyone? I'm not sure. Predicates such as pengine_next/2 and pengine_stop/2 will only very seldom be used with options. Having to nearly always have [] in the second argument would be unhelpful. And since pengine_ask/3 belongs to the same family, isn't it more consistent to keep pengine_ask/2 as well? I guess some versions without options can go, but I don't think that we want to reduce them with nearly half. Cheers, Torbjörn -- Torbjörn Lager Professor of General and Computational Linguistics Department of Philosophy, Linguistics and Theory of Science University of Gothenburg Box 200, SE-405 30 Gothenburg, Sweden Phone: +46317864962