I want to learn Tcl programming, but I`m having trouble with compile source code. I need good compiler tool. Can you help me? What compiler should I use or the best one?
Thank you !!!!
I want to learn Tcl programming, but I`m having trouble with compile source code.
Share
Tcl is a programming language. It has a number of implementations, but the one you are most likely to be able to get hold of is
tclsh. Linux-based systems often have one already installed (if not, there’ll certainly be a way to get it from your distribution’s package repository). On Windows, the ActiveTcl distribution from ActiveState is highly recommended. I don’t know if all MacOS X systems have it (mine did) but you are recommend to get ActiveTcl anyway as that also includes many extra useful packages for things you can do with Tcl, and is also more likely to be up-to-date.You might also encounter the
wishandexpectprograms; these are actually little more thantclshwith an extra library loaded into them and pre-activated for you. (Forwish, that library is Tk which does GUIs, forexpectthat library is Expect which does terminal interaction.) The Tcl they include is the same as intclsh, but has some extra commands.When asking future questions here about Tcl, it helps a lot if you mention the exact version (as reported by Tcl’s
info patchlevelcommand) that is being used.In terms of compilers, you don’t normally need one. The implementation engine used by
tclshactually does dynamic compilation of your Tcl program (to a bytecode) as necessary, and is so fast that it is actually slower to load bytecodes than to recompile from scratch. (We did some tests and decided that, whatever speedups we should do, saving bytecodes were not going to be a part of the strategy as there was no point.) The only real case for using a compiler with Tcl is where you are using it to obscure the code, to make it hard for a user to look at and change. But the only sane scenario for that is when doing commercial apps (it’s against the basic principle of Open Source Software) so if you need it, you are going to be directed to a commercial solution. (ActiveState sell such a product.) OTOH, if you’re really thinking more about packaging — putting your code together in a neat parcel — then we have a different technology for that, the starkit, which is very neat indeed. But that’s getting a bit further off the topic…