guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SRFI-37 and short-name option with optional argument


From: zimoun
Subject: SRFI-37 and short-name option with optional argument
Date: Tue, 12 May 2020 22:14:21 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]