lua-users home
lua-l archive

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


On Sat, Mar 15, 2014 at 9:21 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Sat, Mar 15, 2014 at 6:14 PM, Coda Highland <chighland@gmail.com> wrote:
>> I dunno, it only took me one day to do my C++ wrapper (which I sadly
>> can't release).
>
> That's the point; it's not rocket science, and a reinvented wheel -
> because honestly, that kind of stuff was always the entertaining part
> of C++ - creating a custom notation/DSL.
>
> However, because your hands are tied, you don't have to release, which
> saves you from having to document it ;)  Which is the part I still
> find hard, but if I don't do it, I am disrespecting the time of
> others.
>
> steve d.
>

Of course, the only really interesting thing in my wrapper was the
iterator class. The wrapper overall still exposed the stack because I
didn't want to muck with managing references and leaking memory, but
it provided conversions between a Lua value and the tagged variant
class the rest of that project was already using. It also kept track
of stack indexes if you asked it to, and of course the API was
formatted like the rest of the project so it looked prettier than
random old-school-looking C calls interspersed with modern
Java-inspired C++.

/s/ Adam