Xref: utzoo comp.lang.perl:1661 comp.unix.wizards:22678 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.perl,comp.unix.wizards Subject: Re: Looking for balanced critique of Perl Message-ID: Date: 28 Jun 90 16:13:05 GMT References: <4811@muffin.cme.nist.gov> <103428@convex.convex.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 62 In article <103428@convex.convex.com> tchrist@convex.COM (Tom Christiansen) writes: > I don't know that I'd be thrilled to see Xlib built into perl, and > while I know Larry's adding curses, or at least providing the ability > to do so, I wonder how well this will work out. I'm concerned about > efficiency and ease of coding of these things. Will the ability to > patch in your own C functions cause people to turn from C in cases > where this is not honestly merited? One thing I have found useful is John Ousterhout's TCL: Tool Command Language. It's designed to add an extension language to various tools and (at least in the original, and in Karl Lehenbauer's AmigaTCL version) uses an RPC mechanism to communicate between separate programs. This way no individual program becomes a kitchen-sink. I have published, to the net, a version of my "browse" directory browser with a TCL interface. It's a nice clean language (sort of like a text- oriented Lisp), and adding extensions to it is amazingly easy. Here's a section of my browse.rc: proc key_'K' {} { browse message {Edit key } set key [get key] set func key_[get keyname $key] set file [get env HOME]/.function if { [length [info procs $func] ] != 0 } { set def [list proc $func {} [info body $func]] } else { set def [list proc $func {} { ... }] } print $def\n $file browse message !vi $file browse shell [concat vi $file] source $file } proc key_'F' {} { set func [get response {Edit function }] if { [length $func chars] == 0 } return set file [get env HOME]/.function if { [length [info procs $func] ] != 0 } { set def [list proc $func {} [info body $func]] } else { set def [list proc $func {} { ... }] } print $def\n $file browse message !vi $file browse shell [concat vi $file] source $file } proc key_'d' {} { if { [string compare d [get key -d-]] == 0 } { set file [get file .] set prompt [concat Delete $file {? }] if { [string match {[yY]} [get key $prompt]] } { if { ![eval [concat browse delete $file]] } { perror } } } } -- Peter da Silva. `-_-' +1 713 274 5180.