API redesign progress

Linus Torvalds torvalds at linux-foundation.org
Mon Jul 2 13:24:13 PDT 2012


On Mon, Jul 2, 2012 at 12:34 PM, Jef Driesen <jefdriesen at telenet.be> wrote:
>
> At some point I do want to replace the callback based interface with an
> iterator based interface.

I'd love to see that, because it allows us to just keep our own data
in the natural data structures, instead of having to encapsulate them
into some callback structure and a single pointer to it.

So in general, I understand that you *internally* may want to use a
much more complex interface, and that you may even want to expose
those complex interfaces to applications like MacDive that then
actually have their own parsing logic etc. But at the same time, I
would really love for there to be a simple and straightforward
interface that does not have those kinds of internal details
associated with them.

The same way you were able to abstract all the per-dive-computer open
functions into one "dc_device_open()" one (while still having the
"suunto_d9_device_open()" etc stuff internally), I would really hope
that libdivecomputer migrates to that kind of simpler interface (while
possibly having the more complex interface available for users that
*want* to see the internals).

                Linus


More information about the subsurface mailing list