lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> It's not a problem of attitude or opinion, it depends on what problem you
are trying to solve.

That's a better way to frame the discussion.

I was only trying to speak to my personal experience:

> Has anyone else had any experience with binding libraries? Have they been hindrances or helpful?

On Sun, Jul 31, 2016 at 5:59 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2016-07-31 5:24 GMT+02:00 chris beck <beck.ct@gmail.com>:
> I guess I agree with the idea that thin is best. It feels risky to use a
> very elaborate library because if you try to do something the maker didn't
> intend, you can end up with a very complex problem that you wouldn't
> otherwise have. The thinner it is, the less likely it is to hinder you and
> the easier it is to reason about resources and performance. It was pretty
> important to me that the bindings I made try to be cohesive with the lua C
> api, rather than trying to replace it with something else.

It's not a problem of attitude or opinion, it depends on what problem you
are trying to solve. If your intended users already know the C interface,
you want a thin wrapper providing all of the library, and you can get away
with essentially zero new documentation. (At that point I wonder why one
should bother tio do it by hand, there are tools that can do it from the .h
files.)

If your intended users are ordinary Lua programmers that just need
some batteries, then a wrapper that hides almost everything and
provides a simple interface is the way to go, like the access Löve2D
provides to its graphics and audio facilities.