Loadable modules - New paradigm of Tcl programming? 
Author Message
 Loadable modules - New paradigm of Tcl programming?

Recently I've tried to use load command in Tcl 7.6 to
add C-written command I need instead of flooding my
/usr/bin with lot of wish'es with this compilied in or
that compilied in.

I found this thing very useful becouse I can decide which
extended commands I need when writing script.

Suppose you have to write script which reads xpm files
and creates symlinks. Silly system administration task
which can be accomplished in ten lines of code.

But you'll need to compile special wish for this, becouse
tixwish doesn't create symlinks and wishx doesn't read
xpms.

if you have both tix and Extended Tcl as loadable modules,
you only have to say
package require Tix
packager require ExtendedTcl
at beginning.

So this concept allows to use quite different paradigm
of writing tcl extension

Really, do you need to load entire tix just to read few
xpms? no, you only need pixmap images support.

And if this script is started from your .xinitrc, you may
wish to save few kilobytes by avoiding loading of
unnesseccary extensions.

So new paradigm of Tcl extending would look like:
put each new command (or few closely related ones) into
separate loadable module.

This remotely resembles concept of Unix operating system
itself - lot of highly-specilized and easy combined
utilities instead of monsers like Microsoft Word.

It also resembles Oberon system concept, becouse modules
is more than just external commands. They can have some
internal data structures or something like.

---------------------------------------------------------------------------
Phone: 7(095)230-80-61          Victor B. Wagner
Fax:   7(095)230-80-42          Dokuchaev Soil Institute, Pyzhevsky lane, 7



Mon, 15 Nov 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Programming loadable modules in Win 3.1

2. Cross-linking Tcl loadable modules

3. HELP: Creating TCL loadable modules in HP

4. A New Programming Paradigm

5. GDB-Tcl : A new paradigm for debugging

6. Logic Programming as an Introductory Programming Paradigm

7. Logic Programming an Introductory Programming Paradigm

8. Logic Programming as an introductory programming paradigm

9. Logic Programming as an Introductory Programming Paradigm

10. Logic Programming as an Introductory Programming Paradigm

11. Python 2.2 loadable SSL module for Windows

12. building loadable modules with gambit

 

 
Powered by phpBB® Forum Software