2023年12月11日(月) 23:37 Chet Ramey <chet.ra...@case.edu>:
> On 12/10/23 1:58 AM, Koichi Murase wrote:
> > It's too late, but a better way could have been introducing the
> > function-call syntax and supporting signed n-adic numbers through e.g.
> > « int([-+]digits, n) ».
>
> You're 40 years too late. The [base#]number syntax was in ksh-83.

Sorry for my confusing writing, but I meant that instead of dropping
the support for `10#' in Bash 5.1, we could have supported something
like « int([-+]digits, n) » or « strtol([-+]digits, n) ». Maybe I
misunderstand it, but AFAIU, `10#' was dropped in the following
thread, which discusses `10#$X' where e.g. X='-10':

https://lists.gnu.org/archive/html/bug-bash/2019-06/threads.html#00039

I thought the motivation for dropping the support for `10#' was to
make `10#-10' unambiguous when ksh's treatment of « 10#[-+]digits »
would be added to Bash in the future. However, if « int([-+]digits, n)
» is added instead, « 10#[-+]digits » does not need to be added to
Bash, the ambiguity in « 10#[-+]digits » does not arise, and `10#' can
continue to mean 0 for backward compatibility.

Anyway, it's too late; `10#' is already removed.

--
Koichi

Reply via email to