Let me preface all of this by saying that I like ksh93 and used it as my
default shell for many years.  This is not about what is the best shell or
best shell scripting language.  This is about ensuring we have the
expertise to maintain and evolve key scripts in our community.  I would
welcome data that shows our community is in fact awash in ksh93 experts.

 > What exactly does "clamoring" mean ? Assuming it means "want"

It means there is a stated strong interest.

 > as said it is usefull (e.g. take a look at the DMAKE_MAX_JOB "memory
 > limiter" in one of my other emails)

The resource control mechanisms built into Solaris can't do what you need?
Keep in mind all of the processes spawned from nightly run in their own
task.

 > 1. One of the real problems is that the coding style (OkOk, nightly is
 > quite old and grew over time (and I think it was originally a Bourne
 > shell script, right ?)) and code pieces of scripts like nightly.sh are
 > used as "justification" (e.g. "nightly uses Bourne syntax/eval/no error
 > handling/no quoting/<insert-more-horrible-scripting-things> - why should
 > I use something else ?") to do similar things in new scripts, e.g. some
 > kind of "cargo cult scripting" (also known as CPP-programming
 > ("CPP"==copy, paste, pray).

I don't find this a compelling reason to rototill nightly, nor can I
recall anyone holding up nightly as a model of great programming.  It's
just a shell script that gets the job done.

 > 2. Can we please agree that the usage of obsolete syntax and obsolete
 > pre-POSIX features should be replaced with POSIX constructs (see below
 > for "ksh88 vs. POSIX shell"), datatype abuse fixed (for example CR
 > #6872747 ("nightly's total build time calculation is b0rked") is one of
 > the bugs which could've been completely avoided long ago by just using
 > "integer" and "printf") and that the script's I/O should be
 > "streamlined" ? AFAIK this would cover most of the things I'd like to do
 > with "nightly" ...

Can these things be fixed by using ksh88 constructs?  If so, I have no
objections, though I think exceptional care is needed: any breakage to
nightly will have significant impact on the community as a whole.

 > > The number of developers I know who know the specifics of "POSIX shell
 > > syntax" can be counted on one hand.
 > 
 > I think this is not true. The POSIX shell syntax is a derived subset of
 > the the ksh88 shell syntax with minor variations (e.g. functions
 > declared with "foo()" do not have a seperate scope while ksh88 provided
 > a seperate scope etc.) which are usually hard to find (anyone care about
 > the difference that ksh88 treats "010" as decimal value "10" while POSIX
 > uses decimal value "8" ?) and therefore I think most people working on
 > OS/Net should be familar with it... :-)

Perhaps they should be, but they aren't.  In ON, shell scripts are
typically used in a straightforward, simple way.  You may find the
resulting scripts offensive, but they work well and have been maintained
and enhanced by many engineers over the years. 

 > > As I said, I am not so much concerned by your current changes as by the
 > > direction it sets for ever-more-obscure ksh93 changes.
 > 
 > But which obscure changes do you mean ?

I would start by only allowing ksh88 constructs, and then only introduce
specific ksh93 constructs if they markedly simplify the script.  To folks
who do not know ksh93, even a basic construct that is unknown to them will
lead to confusion -- so I think there needs to be a compelling reason,
such as the ability to delete hundreds of lines of code.

 > familar egrep expressions... =:-) ) and using "redirect
 > 4<>/foo/filename" instead of "exec 4<>/foo/filename" (because "exec"
 > will terminate the shell interpreter immediately on |open()| failure
 > while "redirect" allows to catch errors in the script) )).

That's a great example of an obscure ksh93-ism that most will not know.

 > > (I know that doesn't fit with your agenda.)
 > 
 > Groan... please see above... as said I don't want to turn the script
 > into some object-oriented monstrosity or something worse. That's not on
 > my agenda. Neither am I interested in "world domination" or something
 > like that. My only interest is to get some janitor work done which is
 > IMO urgendly needed...

Then please stick to ksh88 so others can comfortably maintain it.

-- 
meem
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to