[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] clue release 6
- From: Reuben Thomas <rrt@...>
- Date: Mon, 14 Mar 2011 12:29:18 +0000
On 14 March 2011 04:28, zhiguo zhao <firstname.lastname@example.org> wrote:
> Good, but need pcall wrap.
If you want pcall:
CLUE_DO (L, "pcall( ...)")
But it may help if I explain the reason I don't use it by default.
clue is not intended for production code, but for quick hacks. For
production code, use the standard C API. My particular motivation was
having a tool that enabled me to rewrite C code in Lua a function at a
time, while keeping the program as a whole working the whole time.
With this use in mind, I found it more useful to follow the rule
"crash early, crash often", as it meant I found bugs quickly.
For other sorts of quick hack, I can see one may prefer a more
permissive "try to keep going" approach. Looking at the code, this
just means exposing an internal function in the API, so I'll do that
in a new release, out shortly.
Thanks for the prod.