Re: pengines extension to html_requires
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 02/09/2014 01:23 PM, Torbjörn Lager wrote: > On Sat, Feb 8, 2014 at 4:17 PM, Jan Wielemaker <[email protected]> wrote: > >>> Must confess, I'm lost what many of these predicates do. >> >> I think some of these should become private. Torbjörn? > > 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? > 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. > 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. Note that the general approach I tend to take is to export as little as possible and export more if there are legitimate requests for more functionality. Cheers --- Jan 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?