Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-workers 43616, typeset doesn't report tied parameters



2018-10-09 00:54:16 +0200, TS:
[...]
> IMHO when a readonly is tied, the newly tied var (either scalar or array what
> ever comes last) should take over the content AND the readonly flag in one go.
> OR a readonly should not be tieable at all.
[...]

I kind of agree. On the other hand, attributes are not mirrored
between pairs of tied parameters  (anyway, most attributes only
apply to scalars and not arrays).

One could imagine someone wanting to make only the array or only
the scalar readonly to force modification using the other one.

readonly is kind of a programming aid (reminder that the
parameter  should be constant). Tied parameters are really
designed for the LD_LIBRARY_PATH, INFOPATH... They are
different concepts that would generally not be used together I
would say.

One can always make both INFOPATH and infopath readonly if they
don't want it to be modified.

-- 
Stephane



Messages sorted by: Reverse Date, Date, Thread, Author