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

Re: PATCH: Re: Compsys and KSH_AUTOLOAD



On Apr 16,  6:49pm, Oliver Kiddle wrote:
}
} Why do export and readonly accept -f arguments? Is that just to avoid
} errors on bash scripts? Any reason why we shouldn't implement readonly
} functions.

It could get pretty tricky to have a readonly autoloaded function.  Does
the function become readonly only after the autoload occurs?  What *can*
one change about a readonly function -- can one `typeset -t' it?  If it
hasn't been loaded yet, can the new ksh/zsh autoload flags be changed?

BTW, independent of readonly, what do +z and +k mean?  Revert the
function to using the current global ksh_autoload setting?  What happens
if you use +k on a function that has -z ?

} On 13 Apr, Bart wrote:
} > 
} > } > Here's a possibly-silly idea:  Those flags could be made to apply
} > } > to arrays as well as functions
} 
} [If] the math modulo operator is being used on an index variable, zero
} based arrays are more useful. Having `-z' mean not zero-based might be
} confusing though.

Yes, that's true.  Having -z mean something different for arrays and
functions might be confusing, too, unless -k is invalid for arrays, but
that might be more confusing than having -k mean zero-based and -z not
valid.  Argh, my head hurts.



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