4 ms·
Hello, Redis test suite is written in Tcl because for this kind of stuff Tcl is very good. A few reasons: 1. It is very easy to write DSLs in Tcl, you can turn
by antirez 11y ago
Hello, Redis test suite is written in Tcl because for this kind of stuff Tcl is very good. A few reasons:
1. It is very easy to write DSLs in Tcl, you can turn it into a radically different on-purpose language. If you think Ruby is good at DSLs, try Tcl.
2. It has good I/O functions and is event-driven by default. The Redis test for example uses a server-client model using the event driven support of Tcl.
3. It has excellent ways to interact with other Unix commands, see for example the [exec] command: http://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm http://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm
4. It has automatic memory management but does not use a garbage collector, reference counting is used instead. This means that the memory footprint is small and there are no GC pauses. Moreover the interpreter is extremely stable.
There are more reasons for using Tcl in certain projects, the above are the reasons I'm using it for Redis testing.
- srean 11y agoHa! I would have expected to see Jim there. Do some of these strengths not apply ? I have heard rumors about Tcl 9.0 and Jim merging, any opinion on that. Would love to hear how Jim came about in the first place.
- yellowapple 11y agoThe use of reference counting is suddenly really compelling for me to try out Tcl a bit. I've been looking for a good reference-counted language (other than Perl, which is where much of my programming background originated), and Tcl's looking more and more like a good fit.
- beagle3 11y agoCPython is a good reference counted language. So are J/K/A+/Kona. (PyPy and Jython are NOT reference counted - so saying "Python is reference counted" is wrong)