[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Binding Libraries: A (Performance) Comparison
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 31 Jul 2016 11:59:41 +0200
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.