Although rarely used, the bash declare statement does have a couple useful options. It can mark a variable as read only and also mark it as being a number only. To declare a variable as read only, use ...
I believe your alternative is exactly equivalent, so the reason they didn't do it that way is just that they preferred their way for whatever reason. Presumably they found it familiar and readable and ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results