6 ms·
TCL is embeddable (in another program). In fact that's how it started. That means it's a good language to extend your program. I don't know how it compares to
by AceJohnny2 2y ago
TCL is embeddable (in another program). In fact that's how it started.
That means it's a good language to extend your program. I don't know how it compares to Lua, which seems to have replaced it in that space.
- einpoklum 2y agoYou mean, the interpreter is available as a library with bindings in many languages? But then - isn't that the case for other scripting languages these days? Or are they too complex and with "strings attached"?
- robinsonb5 2y agoI can't speak for other scripting languages, but it's absurdly easy both to embed Tcl as an interpreter in a larger project, and to create a Tcl extension which implements your own commands.
- einpoklum 2y agoYou're using the same words. What is "easy" about embedding TCL that is "difficult" about embedding Perl or Python? Can you spell this out?
- robinsonb5 2y agoSorry, missed this at the time. But I did say I can't speak for other scripting languages. All I can say is that it was much easier than I was expecting!
- edoceo 2y agoOne can leverage Lua in PHP, I think it's handy for user-supplied logic (eg: business rules)
- wduquette 2y agoI like TCL a lot more for this use case, and I don’t care for Lua at all; but Lua might be a better match for embedding in an OO language.
- 77pt77 2y agoLua is simple to bolt on to your project. Perl is a nightmare to interop! They should have won an award for that. It took effort. Python is slightly cleaner than perl, but not much.