comp.lang.ada
 help / color / mirror / Atom feed
From: mockturtle <framefritti@gmail.com>
Subject: Re: GCLP (Generic Command Line Parser) 1.0.0 released
Date: Sat, 15 Dec 2012 08:20:19 -0800 (PST)
Date: 2012-12-15T08:20:19-08:00	[thread overview]
Message-ID: <9e1a279f-5dc0-47a8-8196-05de1f95e9da@googlegroups.com> (raw)
In-Reply-To: <op.wpbyefvfule2fv@cardamome>

On Saturday, December 15, 2012 12:33:41 AM UTC+1, Hibou57 (Yannick Duchêne) wrote:
> Le Fri, 14 Dec 2012 22:17:17 +0100, mockturtle <framefritti@gmail.com> a  
> 
> écrit:
> 
> >    fictional.exe input=foo.txt output=bar.xml
> 
> If that's a real life example, 

No, it is not a real life example.  I just added .exe to emphasize that "fictional" was a command.

> then it does not follow the standard on  
> 
> Windows platform (as that's an *.exe), which is to use a slash prefix for  
> 
> parameters.

Do you mean something like 

           fictional.exe /input=foo.txt /output=bar.xml

Well, you could do this as well, by setting the parameter names to "/input" and "/output".  By the way, the real "translation" of this under Linux would be

           fictional.exe --input=foo.txt --output=bar.xml

and you can do this as well, by using "--input" and "--output" as parameter names.

> 
> 
> 
> One nice feature of a command line parser I believe, is to allow to be  
> 
> close to the platform standard. There's already too much inconsistencies  
> 
> with too many applications not following any common standard. In return,  
> 
> this make the command line interaction more intuitive and straight away.

I agree that this differentiates itself from the usual syntax.  I choose this approach (and wrote this package) once that I needed to write a program with a fairly complex syntax and with many possible variations.  So, I decided for this approach that, you could say, have no (positional) parameters, but only options.  In this case, the "--", "-" or "/" necessary to mark an option became redundant.   Nothing prevents you to put that back in the option name, if you desire.

> 
> 
> 
> That's just a personal opinion.
> 
> 

Thank you for your interest.

Riccardo

> 
> 
> 
> -- 
> 
> “Syntactic sugar causes cancer of the semi-colons.” [1]
> 
> “Structured Programming supports the law of the excluded muddle.” [1]
> 
> [1]: Epigrams on Programming — Alan J. — P. Yale University



  reply	other threads:[~2012-12-15 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 21:17 GCLP (Generic Command Line Parser) 1.0.0 released mockturtle
2012-12-14 23:33 ` Yannick Duchêne (Hibou57)
2012-12-15 16:20   ` mockturtle [this message]
2012-12-15 16:57     ` Yannick Duchêne (Hibou57)
2012-12-15 18:08       ` mockturtle
2012-12-18 15:33         ` Brian Drummond
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox