Hacker News new | ask | show | jobs
by tarabukka 4933 days ago
Why do I see people talking about this kind of thing in Tcl being perfectly okay, while PHP is nowhere near as randomly dynamic and gets a lot of hate?
2 comments

I suspect for two reasons - first, that Tcl is always dynamic the same way and in clearly documented places, whereas PHP is a lot less consistent about it; and second, that in Tcl a lot of the core language constructs do so, so it's something you get familiarised with early rather than bitten by later.

Plus, PHP users seem to be most likely to either go "err, so?" or "YOU DON'T UNDERSTAND THE TRUE GLORY OF PHP!!!" in response to being asked about it, whereas Tcl users generally tend to respond "yeah, you need to learn about that and get used to it" - which tends to significantly alter the next comment made.

(not trying to imply that PHP doesn't have users in the third category, just that the first two are the more visible and it alters the discussion's tone)

Probably because Tcl has other redeeming qualities.

Command line programs are now passe in all except a few niches like routers, chip design etc, but IMHO there still isn't a better "/bin/sh++" that you can embed as command line shell interface between your C functions and the user.

Swig + Tcl + C/C++ works like a dream!

Lua?
I would make a distinction between a CLI (to be used by ordinary users of the program) and a scripting interface (to be used to "extend" the program, to be used by power users and/or other programmers).

And I would further submit that the same language may not be the right choice for both tasks.

Tcl leans further towards being a pleasant CLI interface language, while AFAIK Lua leans further towards being a pleasant plugin development language.

IMHO.

tclsh is a REPL (Read/Eval/Print Loop) coded against libtcl. libtcl is _easily_ integrated into any C (C++) development project. tclsh is but one.