Subject: Re: [BUG] functions can't create global readonly variables
From: Peter Stephenson <[email-masked]>
To: [email-masked]
Date: Sun, 3 Jan 2016 19:00:31 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

By the way it seems that, in bash at least, "readonly" breaks
encapsulation:

$ readonly foo=empty
$ fn() { local foo=bar; echo $foo; }
$ fn
bash: local: foo: readonly variable
empty

The only use I can see of this is for exported variables, where you
might want to ensure a specific value was always exported to an external
programme.

pws