Date:        Mon, 17 Feb 2020 15:22:08 +0000
    From:        Geoff Clare <g...@opengroup.org>
    Message-ID:  <20200217152208.GA9739@lt2.masqnet>


  | Not at all.  If the discrepancy between ksh88 and POSIX.2-1992 had
  | come to light before those systems were certified, the standard would
  | have been amended to allow the ksh88 behaviour at that time.  The end
  | result would be the same, just the timing would be different.

That might or might not be correct, it is impossible to say now - after
all "select" was known at the time, and not standardised, my guess is
that the reserved word "time" would, at best, have been treated the same,
but we can never know for sure now.

However I would note XRAT C.2.4 ...

        The list of unspecified reserved words is from the KornShell,
        so conforming applications cannot use them in places a reserved
        word would be recognized. This list contained time in early proposals,
        but it was removed when the time utility was selected for the Shell
        and Utilities volume of POSIX.1-2017.

which to me suggests the exact opposite of what you believe would
have happened (someone with access to earlier copies of the standard
would need to check and see how long that text has been there, certainly
that it mentions "POSIX.1-2017" means nothing, that's just "current version").

But regardless of that, decades have passed, implementations and
applications have been built based upon the spec as it was written.
Making substantial changes without a good reason (a very good reason,
and retrospectively correcting missing conformance tests is not one)
is unreasonable.

[me previously...]
  | > specify that use of the time utility (specified as unquoted "time")

  | Treating time something like select and [[ would be an alternative way
  | around the problem.  What you suggest for "use of the time utility" is
  | not quite right, though.  Use of the time _reserved_word_ should be as
  | you say - unspecified unless it prefixes a simple command.

That's what I meant by the '(specified as unquoted "time")' - that is,
where it could be a reserved word.  Note that "time" is not currently a
reserved word, so
        time command1 } command2
pipes the output of "time command1" to command2.   Anything to allow
time to be a reserved word breaks that usage.   That's unfortunate, but
as we know, is already broken in many shells, and updating the standard
so it matches current reality is a good reason.   Mandating copying of
the way ksh does it is not justified though.

  | Use of the time _utility_ can stay specified the same as now.

Yes, sure.   Except when "time" (unquoted) might be treated as a
reserved word, and is used in a place where more than a simple
command follows.   Note that the "reserved reserved words" are a
constraint upon conforming applications (which cannot use them in
places where they might be treated as reserved words), not any
kind of requirement on implementations.

kre


Reply via email to