It is currently Fri, 15 Oct 2021 21:27:07 GMT



 
Author Message
 Anybody interested in a (working) OO Shell Scripting Language?

Netters,

I have recently completed an alpha version of an object oriented (Bourne)
shell, which I informally call sh++.  I put it together as a trial to
a) see if it could be done; and b) to refine my understandings of OOP
without getting too messed up with C++ syntax (yet).  I also had a new project
on the burner: to build a home-grown bug-tracking system that will
withstand considerable evolution as our SE process evolves.  So I partially
engineered, partially hacked out a first draft of sh++.

My question.... is this just another stupid invention that could well
be dropped?  Do I bother writing documentation and having some of you
take a look at it?  It seems like a worthy candidate for at least
a paper... but I am new to what's going on in the unix/oop world.

Here's a few details about sh++ in case you are interested.....

The basic strategy is a sh++ "compiler" written in nawk, which
processes C++-looking "class" files.  These files, containing
one or more related (or unrelated) classes, define the variables and
methods for the given class.  These ".O" files are very clean-looking
shell code... just the implementation of the various methods.  The output
from the compiler is, well, somewhat messy shell scripts -- not that much
longer than the input files, but with all the messy implementation details
needed by a shell-based system included.

To enable succinct and quick instantiation, I developed a "Description
Language" which allowed the user to specify and organize the various objects
needed for the proper execution of the program.  The description compiler
processes these files and generates instances of the objects.  There also
is (actually, will be) a flag enabling you to delete the objects as well.
Objects are also created dynamically by the program using a little
script called "new" (creative, eh? :-)

Although I couldn't  implement each and every "desirable" feature of
an OO language, I was able to implement quite a few of them.  Among them:

   1) class extention via inheritance, any number of levels.
   2) dynamic and static instancing
   3) public, private, and protected categories for variables and
      methods.  (Unfortunately, the exact meanings differ from C++
      due to limits of the shell)
   4) Virtual (both pure and in-line) methods may be defined
   5) The ability to develop "system types" vs. application types
   6) Support for various levels of debugging output
   7) File-based storage.... everything is persistent
        (this could easily be changed... but the startup time might
         start to look ugly.)
   8) Seperate name spaces for groups of sametyped objects available

SOME OTHER NOTES:

 9.0)  Done on a SIG VGX machine(IRIX 3.2.2), so i don't now how it will fare
        execution time wise on other machines (this one's very fast)
 9.1) Classes already defined for :
        special user file types (based on extension)
        sets (subset of 0 or more of a fixed set of items)
        strings
        text blocks
        dates (right now, just the mm/dd/yy variety, but easily extensible)
        states (1 of a fixed number of states)
        menus (tty based)
        records, relations, fields (of the above types), reports (using DWB)

        As you can see.... i was developing this for a database application :-;

  10)   Extensive use made of file linkage (soft) to maximize reuse and
        minimize file space wasteage.

  11)   Based entirely on Bourne shell and basic unix commands, so it
        should fly most everywhere.  

  12)   I have written an entire MR TRacking database with sh++, and
        it does work!!  1100 lines of SH++ input produced 1555 lines
        of actual shell (minus the relatively small number of lines
        used to store the data).  

  13)  All objects can be invoked on the command line.

So..... a weary shellwizardhacker asks.... is it worth detailing further?
All comments sans flames are welcomed.

Steve Dahmen
s...@vab01.larc.nasa.gov
--
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Steve Dahmen, Systems Analyst                         (804) 864-4519 (W)
Vigyan Research, Inc .- NASA Langley Research Center                    
Internet: s...@vab01.larc.nasa.gov



 Sat, 26 Feb 1994 00:36:29 GMT   
 
   [ 1 post ] 

Similar Threads

1. Download: gbeta 0.81 -- an advanced OO language

2. Free OO toolkit -- language independent

3. gbeta 0.9 -- an advanced OO language

4. How to write a shell script that can be translated to non-English language

5. Shell Meta-script language?

6. c-shell as a command language rather than a programming language

7. Programming languages and scripting languages

8. Does anybody know correct syntax for using ~%put in shell script


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software