ap

Byron Rakitzis byron at archone.tamu.edu
Wed Jun 5 00:55:00 AEST 1991


After compiling perl on my system and being nauseated by the syntax of
the language, I've decided to try to come up with my own alternative.
I'm going to call it ap, or anti-perl.

Right now I'm thinking that ap will be a super-awk that is less
confusing for a C programmer to learn. I'm not sure if I want the
implicit looping over stdin (though that's kind of nice) and I
definitely don't want the

	pattern { action }

syntax that awk has. It will have an integer and a string datatype, and
you should be able to build arrays out of those objects (associative
arrays too). Functions would be a nice thing to have, but it must
always be easy to toss off a quick one-line ap script, i.e., in the
most trivial case I would like something like

	ypcat hosts | ap 'print $1'

or something similar to work just right. I hate having to place braces
around that simple statement as one has to do in awk.

Most importantly, ap will be driven by an easy-to-understand grammar
with C-like syntax. There may be 2 or 3 ways to perform a particular
task, but there will not be 10,000 as there are in perl.

The main deficiency of awk that I see is its inability to interface
well with Unix. Up until recently, awk did not even have ARGC and ARGV,
not to mention things like file redirection. This is where perl has
taken a step in the "right" direction. Of course, it could be argued,
why put symlink(2) into ap when you have ln(1)? Well, this is why perl
was written:  Unix today just cannot provide any performance with shell
scripts; for better or for worse this has to be coded into the command
interpreter.

Ideas are welcome. I really want to write this thing; perl is a
disgrace to the Unix community.
--
Byron Rakitzis
byron at archone.tamu.edu



More information about the Comp.unix.shell mailing list