lua-users home
lua-l archive

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


> i propose to do it in 3 levels:
> - first level libs are simple bindings around OS calls (i.e. using
> pointers and C structures)
> - second level works on top of first level and provides the same
> functionality in Lua way
> - third level are OS-independent libs working on top of second level
>

I second that. Level 1 libs would focus on coverage (thinnest
wrapper), layer 2 still on coverage, but would encapsulate the
primitive structures into tables and such for convenience, still no
functionality would be swallowed in the process, and then, the level 3
would be the "abstraction fest" level, where you can have whatever
goals: either portability, OOP encapsulation, stream abstractions,
fluent-style APIs, whatnot.

This gives more room for competition on levels 2 and 3 and a lot more
choice for anybody. Of course, the martyrs are level 1 will get no
credit for their hard work, but that's life :)