Expect/TCL vs Perl 
Author Message
 Expect/TCL vs Perl

Uh, oh, I KNOW I am probably opening up a can of worms, but here goes anyway...

I recently got ahold of an O'Reilly book called "Exploring Expect", about
a language of the same name designed for "automating interactive
applications". This is an embeddable language which is usually run on top
of TCL.

In the first chapter the author (who is also the creator of Expect), after
going to great lengths promoting the language, goes on to say that it is a
lightweight language ideal for automating many tasks usually run
interactively, due to the fact that it creates a pseudo-tty environment
where the command runs thinking it is in interactive mode, but Expect can
capture, filter and act upon the interactive output of the command,
requiring little or no human intervention.

It also says that for that matter it is preferable to Perl since Perl is a
heavyweight that intimidates users (especially newbies), and being a
kitchen-sink language takes years to master, etc. etc. etc.

What's the official Perl Hacker word on Expect ?
Better/worse/dismissable/usable in context ? How would you place it in a
college-level Unix course: with/instead/before/after Perl ?

Insights welcome.

JMC

P.S. I AM playing a bit of the devil's advocate on this one; Perl is,
after all,    
     virtually my One True Love in scripting languages... ;)

--


Campus Queretaro



Sat, 08 Nov 1997 03:00:00 GMT  
 Expect/TCL vs Perl
At least some of the previous statement is untrue.  

It is completely untrue that it takes months
to learn Perl.  A person can start writing scripts in
Perl the first day they pick up the O'Reily book.  I know
because I did.
My 2 Cents
Steve



Sun, 09 Nov 1997 03:00:00 GMT  
 Expect/TCL vs Perl

Quote:
> What's the official Perl Hacker word on Expect ?
> Better/worse/dismissable/usable in context ? How would you place it in a
> college-level Unix course: with/instead/before/after Perl ?

Expect has its place just like c, c++, perl, tk, and tcl.  Expect was
written for automating interactive applications like telnet and
ftp.  It does this well.  For simple applications, I would use Expect.
However, I don't believe it is powerful enough for anything other
than simple apps.

A good workman knows his tools.  It is best to know how to use all of
these languages.  Then you can combine them to get the job done the
best/quickest/most efficient way.

In a college course, assuming the students know C, I would teach perl,
tcl, expect, and tk, in that order.  Teach the most difficult first.
Teach tk last because it may not be used as often.

- Alan

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


_/  America Online, Inc          _/                       _/
_/  8619 Westwood Center Drive   _/  Phone: 703-883-1609  _/
_/  Vienna, Va  22182  USA       _/                       _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



Sun, 09 Nov 1997 03:00:00 GMT  
 Expect/TCL vs Perl


|> Uh, oh, I KNOW I am probably opening up a can of worms, but here goes anyway...
|>
|> I recently got ahold of an O'Reilly book called "Exploring Expect", about
|> a language of the same name designed for "automating interactive
|> applications". This is an embeddable language which is usually run on top
|> of TCL.
|>
|> In the first chapter the author (who is also the creator of Expect), after
|> going to great lengths promoting the language, goes on to say that it is a
|> lightweight language ideal for automating many tasks usually run
|> interactively, due to the fact that it creates a pseudo-tty environment
|> where the command runs thinking it is in interactive mode, but Expect can
|> capture, filter and act upon the interactive output of the command,
|> requiring little or no human intervention.
|>
|> It also says that for that matter it is preferable to Perl since Perl is a
|> heavyweight that intimidates users (especially newbies), and being a
|> kitchen-sink language takes years to master, etc. etc. etc.
|>
|> What's the official Perl Hacker word on Expect ?
|> Better/worse/dismissable/usable in context ? How would you place it in a
|> college-level Unix course: with/instead/before/after Perl ?
|>
|> Insights welcome.

Insight: Perl is a general purpose programming language that follows the
collection of paradigms and tricks known generally as "Unix".  If you know
Unix then you can program in Perl fairly easily.  If you know any procedural
programming language then Perl isn't too difficult to learn.

Expect is a tool designed for a specific task.  It's probably very good at
that task since it has been optimized for that type of task, but then again
you wouldn't want to use it for anything else other than its designated task.

There are very few cases where one language is "better" than another in any
abstract or absolute way, and if you find anybody who says anything else
then be very careful - they're normally strongly biased for some reason which
has very little to do with the languages themselves.  Perl is good for problems
suited to perl, expect is good for problems suited to expect, C is good
for problems suited to C, and so on.

Lezz

Of course Imp (as used at Edinburgh University) is the ultimate language, so
the foregoing statements do not apply to discussions involving Imp.



Mon, 10 Nov 1997 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. perl and tcl/tk/expect papers available

2. PERL+EXPECT+TCL/TK

3. EXPECT(tcl) functionality in Perl too?

4. TCL/Expect is working better than Perl

5. TCL/Expect is working better than Perl

6. Perl, Tcl and Expect?

7. Any perl functions library working like Expect/Tcl?

8. Can Perl control modem comm like expect/tcl

9. embedding tcl vs. perl

10. perl vs tcl (was Re: New version of C-like interpreter available)

11. tcl vs. perl

12. tcl vs. perl

 

 
Powered by phpBB® Forum Software