[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table output
- From: spir <denis.spir@...>
- Date: Tue, 10 Nov 2009 18:02:13 +0100
Le Tue, 10 Nov 2009 12:33:13 -0200,
Roberto Ierusalimschy <roberto@inf.puc-rio.br> s'exprima ainsi:
> > > I'm sure everyone on this list has written a table serializer at some
> > > point. Here's mine:
> > > http://www.mat.ucsb.edu/projects/luaAV/browser/trunk/extra/modules/serializer/init.lua
> > >
> > > wes
> >
> > Should this reply be understood as "there is a need for this in core lua"?
>
> I think it should be understood as "it is not trivial to be concise,
> meaningful, unambiguous and fit for all purposes here, as a standard
> function would have to be." (thanks to Duncan.)
>
> -- Roberto
>
Well, while I understand that one can have this point of view, it's still surprising for me. From a rather practicle and everyday programming side, table output needs not be perfect, nore fit every possible use case, to be _extremely_ handy anyway. (Again, I'm not talking about serialization, or any other kind of machine-readable representation, even if it may also be, I'm talking of human feedback.) Nothing has to be perfect in a PL, no feature fits all purposes (think at tables themselves ;-).
People customize or build their own tools when needed. About output func, while I don't mean at all that commonly implemented features are supposed to be best, all languages I know output by default the content of their collection type(s), and most programmers use this feature numerous times every day; it's also the degbugging tool #1.
Now, I'll stop arguing ;-)
Denis
------
la vita e estrany