From: Neil M. <ne...@cs...> - 2007-02-13 14:59:01
|
On 12 Feb 2007, at 19:07, Andreas Kupries wrote: > http://wiki.tcl.tk/17686 > > Good enough for adding them to tcllib ? > (Under struct, I would say, should our answer be 'yes') I'm certainly happy to see them added to tcllib. A test-suite is needed, of course. If it goes in to tcllib alongside struct::list, then it might be worth examining the API. For instance, struct::list equal assumes that its elements are either strings or sub-lists, whereas dictutils equal requires an explicit equality predicate for the elements. You could probably add a predicate to list equality, as an optional first argument, and let it default to the current behaviour. Problem is the format -- should it be a simple [eq? $a $b] or include the index too [eq? $i $a $b]? The first is simpler (and allows using things like {string equal}), whereas the latter is perhaps more flexible (e.g., if a list is being used like a tuple). I've some other bits of code that could be contributed to tcl/tklib at some point: * A higher level channel API (http://wiki.tcl.tk/17012) -- I have a bunch of updates/changes to this that I want to finish up, then I think it might be worth adding. * A thread-safe message queue (http://wiki.tcl.tk/17652) -- might be better bundled directly with the Thread extension, but could also go in tcllib. I have some tests and docs for this too, so it could go straight in (subject to review). * Simple download progress widget (http://wiki.tcl.tk/10571) -- with a bit of polish this could find its way into tklib. I have some half- finished code generalising this into a task-progress dialog. I also have a variety of other bits and pieces sitting on my laptop that could be polished up -- e.g., an "article" widget for displaying/ composing email/usenet articles, various implementations of algebraic datatypes and pattern matching, a couple of unification algorithms, a scrolling ticker widget, etc. If any of these appeal I could be tempted into packaging them up. -- Neil |