[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: xml pull parser
- From: PA <petite.abeille@...>
- Date: Mon, 21 Mar 2005 14:09:52 +0100
On Mar 21, 2005, at 13:23, Javier Guerra Giraldez wrote:
i guess the string.gsub( aString, "&", "&" ) should be the last
Getting there. Little by little :P
could be a bit more 'lua like':
I would love to use a for loop.
But this doesn't compile:
for aType, aContent, aName, someAttributes = anInputStream.read()
lua: TestXML.lua:56: `in' expected near `='
What would be the proper syntax then?
One way or another, I need to read more about this fabled generic for
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
and less useful to others
First... make it work... then... perhaps... make it work well...
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.
This is not unheard of.
I don't want to reignite the discussion about OOP vs FP vs anything
remember that not everything has to be an object.
Sure. Same applies for random piles of functions.
But frankly speaking, I haven't seen a great deal of reuse in Lua. At
all. Quite a let down, if you ask me. And here I am writing a dumb
little function to decode XML strings. Duh.
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.
Guilty at charge.
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'
Because I'm not sure what this fabled "Lua way" is. Concrete suggestion
warmly welcome :)
you'll find that you won't have to fight against the language anymore!
I'm not fighting it. Au contraire, I'm subverting it. Resistance is
futile. You will be assimilated ;)
OTOH, maybe some people here like your style... if that's so, i should
Stylistic issues aside, I would love to incorporate more Lua'ism in my
code. Just not sure what those are. Palpable suggestions very much
PA, Onnay Equitursay