[Novalug] Best programming language for "munging?" Not Perl? Ruby? Python?

Clif Flynt clif@cflynt.com
Wed Oct 28 12:20:05 EDT 2009


On Wed, Oct 28, 2009 at 10:31:53AM -0400, Paul D. Bain wrote:
> ...
> 	My question is this: If Perl is deficient in some respects, then which 
> language is now best for "munging," the transforming of messy input into 
> cleaner, culled data? In yesteryear, Perl held this distinction -- does 
> it still? 
>

  OK, no surprise to those who know me at all, but I like Tcl/Tk for
this.

  I've been a professional programmer since 1979, working in FORTRAN,
C, C++, Unix shell, perl, scheme, java, Tcl/Tk and a few other
languages.

  I get more done in less time in Tcl/Tk than anything else I've ever
used.  I bid jobs in man-hours that other teams bid in man-months. (And
I meet my deadlines.)

  PRO: Tcl/Tk is verbose and (relatively) consistent.  The verbosity
makes code easy to read, and the consistency means that you can learn
a command pattern and expect to use that same pattern with another
command.

  Tcl/Tk now supports object oriented coding natively.  TclOO (in 8.6)
has the features of C++/Java and features from Smalltalk, and the Tcl
introspection capabilities that Tcl programmers expect.  I've used 
[incr Tcl], the reflection of C++ into Tcl successfully in the past,
but TclOO actually excites me.

  Tcl/Tk can be easily extended with other libraries of C code to
improve performance.

  Tcl/Tk's procedure and package constructs make it easy to go from 
a quick hack proof-of-concept to production-library code.  

  Tcl/Tk is easy to learn.  I've given TclTutor to fresh grads and
had them writing code the next day.

  You can load a Tcl/Tk program into an interactive interpreter and
tweak it in real time, then update the code once you've figured out
just how you want it.  This is faster than than going through the
edit/compile/test cycle.


  CON: Tcl uses a position based syntax instead of keyword based
syntax.  This is a strength in allowing Tcl/Tk to add new first-class
commands to the language, but confuses folks who are used to keyword
based languages.

  Tcl's substitution rules are consistent, but not always obvious. The
substitution rules are the Tcl equivalent of "C" pointers.  Very
powerful, impossible to live without, and an irresistable potential for
shooting yourself in the foot.

  Tcl's datastructures (array, list and dict) don't always map well to
the way someone used to C structs wants to think.  It took me a few
months to start understanding how I could use associative arrays to
organize my data instead of structs/classes.

  Sites for Tcl/Tk:
  www.tcl.tk - the main site
  www.msen.com/~clif/TclTutor.html - Computer Aided Instruction in Tcl/Tk
  www.cwflynt.com  - A few Tcl games, applications, and stuff.
  wiki.tcl.tk - Many pages of code snippets, style discussion, tricks, etc.

  Happy Tcl'ing,
  Clif
-- 
... Clif Flynt ... http://www.cwflynt.com ... clif@cflynt.com ...
.. Tcl/Tk: A Developer's Guide (2nd edition) - Morgan Kauffman ..
. 17'th Annual Tcl/Tk Conference:  2010,  ChicagoLand, IL  USA ..
.............  http://www.tcl.tk/community/tcl2010/  ............








More information about the Novalug mailing list