lua-users home
lua-l archive

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


hi there :)

my general strategy is to avoid all the magic like metatables, not to
mixing the data and functions, use iterators instead of coroutines -
as far as possible. this way as im not jumping in evil hacking all
around (til i can avoid them) ive found that im making my future
easier and wont get into trouble whenever ill really need hacks as
they wont make a mess with previous hacks...

these are making my data much easier to handle anyhow like traverse,
observe, serialize, manipulate or whatever...

`"%s %s" % {"hello", "world!"}` can simply get a reasonably short
function name* instead of an operator overloading and then there is no
problem like you need a new language feature. lua is sooo much
hackable even without its magics, therefore im wondering about most of
the feature requests in general, most of them are easily redesignable
if not all without getting much pain when using less hack

* like string.formatT=function... with local sft=string.formatT where
its needed (or anything better than this name :D ) i think its not a
big additional pain to use sft(a, b) instead of a % b

you can use a file or a "do ... end" block to encapsulate local
functions. ive redefined tostring to write TA_0x*, FU_*, whatever to
make dumps more compact, but the debug of tekui relies on the original
form, so ive putted the require into something like "do local
tostring=_tostring require... end" block and then no harm happened...
(maybe i rewrote this to make my out() function [nothing much special,
its like print, but not equal] to be wrapped with the rewritten
tostring, thats asking for less pain)


however no offense, just an advice, do ur stuff as u like it, i really
enjoy to see evil hacks and the limitlessness of lua :)