lua-users home
lua-l archive

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

Hash: SHA1

PA wrote:
> On Mar 21, 2005, at 12:08, Adam D. Moss wrote:
>> ... isn't safe against stuff like ' The correction is 
>> fairly obvious. :)
> I added an additional string.gsub( aString, "&", "&" ) before 
> decoding the other entities. Is it what you had in mind?

i guess the string.gsub( aString, "&", "&" ) should be the last

in your original example:

while ( true ) do
        local aType, aContent, aName, someAttributes =

        if ( aType == nil ) then

could be a bit more 'lua like':

for aType, aContent, aName, someAttributes =
	if ( aType == ....

it's a very small point, but i mention it, because in general i've seen
your code is well structured, but very 'unlua', making it less efficient
and less useful to others

You're writing code at an incredible rate, but at the same time you're
creating your own style and drifting away from the others.  I don't want
to reignite the discussion about OOP vs FP vs anything else; just
remember that not everything has to be an object.

i think it was you (hope i'm not mixing memories) who said that you're
fairly new to Lua, and that you liked to learn a language by
reimplementing on it what you already know.  It's obvious that by now
you have a more than average hold of the Lua language itself; why don't
you try to restructure some of your work more closely to the 'lua way' ?
 you'll find that you won't have to fight against the language anymore!

OTOH, maybe some people here like your style... if that's so, i should
shut up.

- --
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -