Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe Tcl does recursion poorly — those all seem to be tiny recursive functions.

Maybe there was something Tcl did well?

https://web.archive.org/web/20060924085254/http://shootout.a...



TCL had an amazing architecture for someone who was working in C. In C, you'd (1) create an instance of a TCL interpreter, (2) register your C functions with the TCL interpreter, and then (3) load scripts into the TCL interpreter. You'd do all your fast stuff in your C code, and just use the TCL for stitching together the high-level logic.


This, it is really easy to embed the tcl interpreter. Far easier than perl and python, even easier than lua.


Especially the commands were invoked command_name(argv, argc) and the thing was just like a CS 101 C program. Dead simple, and as they mentioned just used to orchestrate the fast stuff. You shouldn't make a command block a long time, but you could grab a handle to the output destination and set it up to stream output there from the C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: