From: Jeff H. <je...@ac...> - 2008-04-22 04:21:22
|
KATO Kanryu wrote: > I impremented a load/dump library for YAML. > > There are functional limitations with this module. > load: > - Node Anchors &anchor *anchor > - multi line flow sequences/mappings > - Multi-line Flow Scalars > - Single/Double Quoted Scalars > dump: > - multi rank structures(list/dict) > > http://knivez.homelinux.org/~spro/tcl/yapt-0.1.tar.gz Thanks for this library. It looks good for a first pass. You do have some very odd coding constructs that should be corrected before release. I think this is good for 0.1 commit, then fix after. No offense intended, but it looks like a rough conversion from another language (Perl?), that isn't taking advantage of some of Tcl's advanced features. Some of the idiomatic changes needed: * Use foreach instead of for constructs for lists * Brace all expressions * Some 'concat's look like string appending is meant * Use 'eq' instead of string equal in exprs * Use 'string match' instead of -length in some cases * Is 'isAliasNode' an incorrect conversion from Perl RE? * Use 'string is bool' over lsearch of type - if valid. Regards, Jeff |