On Tue, Mar 6, 2018 at 5:21 PM, Evan Harris <auctionitis@xxxxxxxxx> wrote:
I rarely go more than 1 or 2 parameters on the command line without
specifying the option as well
One or two parameters is generally all you need for CL *programs* also.
You misunderstood the prettifier suggestion (which was a little bit tongue
in cheek) I just meant writing something to clean up and prettify your CL
code which would not be so hard.
I didn't misunderstand. I got it exactly. A prettifier takes existing
code for a given language and cleans it up... so that it's still valid
code in that same language.
And I never said it would be hard. I said it would be tedious.
Maybe you are the one who misunderstood me. When I'm writing new code
myself, I don't need a prettifier. I have written it the way I want it
to look. Where a prettifier might help (me) is where the code was
written or generated by someone else, and they either did it with
sloppy formatting or no formatting. (SEU-prompted CL or the output of
RTVCLSRC would both be the latter.) I don't think we have much
disagreement on cleaning up formatting. I called that portion of the
prettifier the "indenter". But you seemed to completely miss that I
would want a prettifier to also remove unnecessary keywords. It would
be one thing if ALL keywords could be removed. Then it might be mostly
algorithmic. Or if every command always had, say, two positional
parameters and the rest require keywords. Still mostly algorithmic.
But every command is different. So the prettifier has to have
knowledge about every command that it wants to prettify. And that's
just a database of commands and their (omittable) parameters. Tedious,
but not particularly hard.
For what it's worth I think CL verbose as it is is fine the way it is. It
is not intended to be a programming language for writing applications, so
it doesn't the elegance of some other languages.
OK, I can understand that. I disagree that elegance isn't important
for "shell scripting" or automation languages (witness Python's
success in that role), but I acknowledge that traditionally, it's been
common for shell-scripting languages to be pretty homely. Whether they
are like that because folks who use them like them that way, or
whether they were built that way because it was easier to implement, I
don't know.
I get that you find it
ugly but I think the alternative - for example cryptic, confusing
inconsistent unix command lines - is worth the small amount of visual pain.
That's a completely false dichotomy. Unix commands are inconsistent
and largely cryptic, that's true. It's because of their history as
separate, often independently developed utilities, and the Unix
culture. But CL and Unix commands are far from the only two choices.
There is room for something that's not overly verbose but also not
overly cryptic. (Indeed, CL with judicious omission of obvious
keywords, and with decent formatting, isn't too bad.)
John Y.
As an Amazon Associate we earn from qualifying purchases.