From: Zefram <zefram@dcs.warwick.ac.uk>
To: roderick@argon.org (Roderick Schertler)
Cc: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: Re: ksh autoloading
Date: Thu, 27 Mar 1997 18:36:04 +0000 (GMT) [thread overview]
Message-ID: <1424.199703271836@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <pzpvwlurpk.fsf@eeyore.ibcinc.com> from "Roderick Schertler" at Mar 27, 97 01:15:19 pm
Roderick Schertler wrote:
>One of the nicest things about the ksh semantics are that you can define
>the function plus run some initialization code. It sounds like your
>patch will disallow that.
Not at all. Using the zsh style, we can autoload a function foo from
a file saying:
foodate=`date`
foo () {
echo $foodate
}
foo
whereas the ksh equivalent merely omits that last line. One could even do
foodate=`date`
foo () {
echo $foodate
}
[[ -n "${ZSH_VERSION+set}" ]] && foo
to make it work the same under both ksh and zsh.
Remember that the zsh form of autoloading is the canonical one, to be
preferred, and technically superior in some ways to the ksh semantics.
I think it's more important for self-modifying functions using the
zsh style to work correctly than it is for ksh style functions with
initialisation code to work exactly the way they do in ksh. Not to
mention that the new system is simpler.
-zefram
next prev parent reply other threads:[~1997-03-27 18:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-03-26 17:46 Zefram
1997-03-27 18:15 ` Roderick Schertler
1997-03-27 18:36 ` Zefram [this message]
1997-03-27 18:57 ` Roderick Schertler
1997-03-27 19:11 ` Zefram
1997-04-01 0:08 Zefram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424.199703271836@stone.dcs.warwick.ac.uk \
--to=zefram@dcs.warwick.ac.uk \
--cc=roderick@argon.org \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).