unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* SRFI-37 and short-name option with optional argument
@ 2020-05-12 20:14 zimoun
  2020-05-12 20:28 ` Linus Björnstam
  0 siblings, 1 reply; 4+ messages in thread
From: zimoun @ 2020-05-12 20:14 UTC (permalink / raw)
  To: Guile User

Dear,

The semantic of short-name option with optional argument is not clear
as the comment says:

http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.scm#n58

Let consider that the option '-a, --long-a' has an optional argument
and '-b, --long-b' another option.  Currently, from my tests using
SRFI-37:

  -a X -b     # OK (1)
  -aX -b      # OK (2)
  --long-a -b # OK

  -a -b       # KO (3)

The semantic of (3) is ambiguous, obviously. :-)

So, it seems that the argument is not optional for the short-name
case.  One way to resolve such case is to remove the form (1) when the
short-name '-a' accepts an optional argument.

Does it make sense?


Thank you in advance for your wise advice.

Best regards,
simon



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-15 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-12 20:14 SRFI-37 and short-name option with optional argument zimoun
2020-05-12 20:28 ` Linus Björnstam
2020-05-15 15:21   ` zimoun
2020-05-15 17:04     ` Zelphir Kaltstahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).