lua-users home
lua-l archive

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


On Sun, Jun 21, 2009 at 8:33 AM, Bertrand Mansion<lua@mamasam.net> wrote:
> On Sun, Jun 21, 2009 at 3:11 AM, Matthew Paul Del Buono <delbu9c1@erau.edu>
> wrote:
>>
>> Sorry for the spam, somehow this original email got cut off :)
>>
>> >I really do not like the way you are outputting tables at
>> all.
>> >It's way too ambiguous. In fact, two completely different
>> >tables could actually yield the same exact output.
>> >
>> >> a = {}; b = {}; c = {}; a.b = b; b.c = c; c.b = b; print(a)
>> >{ b = { c = { b = {<self> } } } }
>> >> a = {}; b = {}; c = {}; a.b = b; b.c = c; c.b = a; print(a)
>> >{ b = { c = { b = {<self> } } } }
>
> That's true, it's not clear which is the reference of which. I think this
> can be fixed in a future version. Still I prefer to keep the output that way
> because my intention is to make this tool a tutorial for Lua beginners, so
> the output has to be easy to understand. But I have other dump functions
> that make a better job, I'll probably use them.

But is the _tool_ meant to be for beginners, or is the tool plus the
tutorials meant to be for the beginner?  I don't think it's worth
changing the way the interpreter works under the guise of making
things easier when you can solve those issues in your instruction.
Personally, I don't even like that you've changed the way the
interpreter works.. but that's just me.

I'd seriously consider what your focus is actually meant to be.  Isn't
it better to explain to the reader what is going on and lead them
through steps to understand it, than to hide all those details from
them?  Lua is not Ruby, is not Python and hiding those details I can't
see being a good thing.

- Jim