On Tue, 19 Sep 2023, at 8:40 AM, Victor Pasko wrote: > Thanks for your response. > In my opinion, in let "<>" and $((<>)) constructs all variables should be > evaluated, so that $-sign for them is to be just optional
You haven't thought this through. It would amount to an egregious break of backward compatibility, even by the standards of bash. How would you expect for digits above 9 to be expressed for bases above 10? You might, perhaps, argue that the n in "base#n" could be quoted. $ ff='fe' $ echo $(( 16#ff )) # imaginarily prints 254 (instead of 255) $ echo $(( 16#'ff' )) # imaginarily prints 255 (instead of being an error of syntax) Keep in mind that this would render bash less consistent - and harder to reason with - than it already is. For example, $(( 'ff' )) is already an error of syntax in the Shell Command Language. Not to mention that it would further distance bash from other shells, such as ksh93 and zsh. Additionally, you imply that let and $(( should be treated specially. At least, it seems that way because you speak of those two arithmetic contexts, yet not of the others [1]. Why? [1] ((, for, array subscripts, string-slicing parameter expansions etc -- Kerin Millar <k...@plushkava.net>