in reply to Re^2: Use Getopt::Long even if you don't think you need to
in thread Use Getopt::Long even if you don't think you need to

Command line interfaces are like bicycles.

Simple, Economical. Lightweight; requiring little by way of supporting infrastructure or resources(*). Easy to learn, use and maintain.

(*)Contrast with the need for gas and gas stations, and tankers and refineries et al., for motorbikes, cars, busses, trucks etc.

But like the bicycle, every now and again there is the need to carry a little something along with you. So you think to add a saddle bag or maybe a rack and panniers. But whilst you're in the shop looking at what's available, some enthusiast suggests that these options are far too limiting and that once you have either you'll soon be needing something more.

Of course, the trouble with that is, once you have it, there is the temptation to use it for everything until eventually someone will ask if there isn't a better way?

And before anyone sniggers to themselves, "he just wants a GUI", is the fact that they consider that the only alternative, a limitation of my imagination, or theirs?

Futurism, like featurism, tends to open the door to complexity and bloat. Sometimes, actually quite often, using just as much as you need now, besides keeping things simple for now, has the secondary effect of constraining future complexity by forcing the question: What do we actually need?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^3: Use Getopt::Long even if you don't think you need to

Replies are listed 'Best First'.
Re^4: Use Getopt::Long even if you don't think you need to
by Aristotle (Chancellor) on May 26, 2008 at 08:41 UTC

    So what you are trying to say is that people should hand-hack their option parsers just so they do not get into the temptation of using the command line to pull more weight than it can?

    Or if not, and your argument is a different one, then what ever relevance does it have for this thread?

    Makeshifts last the longest.

      So what you are trying to say is that people should hand-hack their option parsers...

      No. You are the only one who's mentioned anything about "hand-hacking". I refer you to my earlier comment regarding "a lack of imagination".

      ... then what ever relevance does it have for this thread?

      Ditto. Relevance:

      Use [big thing] even if you think you only need [small thing]

      Use a trailer even if you think you only need to pick up a pint of milk occasionally.

      Use a Mack truck even if you are only picking the kids up from school.

      Use a Howitzer even if you are only swatting a fly.

      I deliberately didn't suggest any alternative, because the alternatives are already implicit in the title. Whatever you might have used that you are being encourage to drop in favour of GetOpt::Long, is one possibility.

      That might, for example, be GetOpt::Std. That's restricted to 62 options...sooo limiting...not.

      Now you are considering responding with the old saw that: long options are more descriptive and easier to remember. And that is just plain wrong. (YAJ) What do you think --Wno_mudflaps does?

      Or in the context of a recursive HTTP download tool, what do you think the word 'spider' means? Now, how does what you think it means, fit with the description of the wget --spider switch: "don't download anything". Intuative?

      I, in common with thousands of others, use the command tar -xvf archive.tar on a regular basis. I could type that as tar --extract --verbose --file=archive.tar, but I don't. And nobody I know does. Why would we?

      Until I just looked them up I wasn't 100% certain that I knew what they actually did. But it doesn't matter, because I don't think of that as a command with three options. I think of it as as single command. It could, for all practical purposes be tar-xvf archive.tar.

      And don't take any of that to mean that I am pro-getopt::std per se. The whole 'command line switch options as sub-languages' is a (well documented) complete mess. But like many other ingrained ideas, the begats and seven days amongst them, it is unlikely to go away any time soon.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        I am sorry, but I fail to find any cohesive argument at all in your reply. Before this reply, I thought I understood you to be arguing a particular thing (“command line interfaces cannot carry too much complexity so don’t try to coerce them into complex jobs”), but now I no longer feel I understand at all what you think people should or shouldn’t do nor for what reason or absence thereof.

        If you want to argue any particular point, in the interest of clarity, please state it directly instead of leaving it as an exercise for the reader to infer from oblique references.

        Makeshifts last the longest.