lua-users home
lua-l archive

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


Thanks for the link - may thoughts were more along an integrated solution as everything
else can be uncomfortable to use.

That said, I haven't thought about the most obvious solution. I just wrote a package loader
that removes all the lines with assertions. It's just a tiny hack but works like a charm, thanks
to the flexibility of Lua.
Of course I'll have to change this into a real preprocessing step for releases that might
use precompiled Lua code but that's not an issue.
 

> -----Ursprüngliche Nachricht-----
> Von: lua-l-bounces@lists.lua.org <lua-l-bounces@lists.lua.org> Im Auftrag
> von Luiz Henrique de Figueiredo
> Gesendet: Samstag, 15. September 2018 11:42
> An: Lua mailing list <lua-l@lists.lua.org>
> Betreff: Re: new thought experiment: what would you add to Lua ?
> 
> > Especially during optimization, as I rely on some hairy edge cases, I
> > added assertions all over the place, but at some point it's just
> > required to remove/comment them all out as it's simply not an option
> > to not remove them
> 
> One of the examples in my ltokenp, a token processor for Lua, is for
> removing assertions:
> http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#ltokenp