zsh-workers
 help / color / mirror / code / Atom feed
From: Roderick Schertler <roderick@argon.org>
To: Zefram <zefram@dcs.warwick.ac.uk>
Cc: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: Re: ksh autoloading
Date: Thu, 27 Mar 1997 13:57:19 -0500	[thread overview]
Message-ID: <14594.859489039@eeyore.ibcinc.com> (raw)
In-Reply-To: Your message of "Thu, 27 Mar 1997 18:36:04 EST."

On Thu, 27 Mar 1997 18:36:04 +0000 (GMT), Zefram <zefram@dcs.warwick.ac.uk> said:
> 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:

Well, of course, if the function is written knowing it could run under
ksh or zsh then it can be made to work.  The problem is that a function
which was written in ksh style will suddenly stop working (on first
invocation).

> 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 don't see how the zsh behavior is superior, and I do see advantages to
the ksh behavior.  I always figured it was an oversight/misunderstanding
on the part of pws, like the [16]ff business.

Consider a file which provides 3 tightly related functions and runs some
initialization code.  I used such a think for directory stack handling
in ksh, eg.  In ksh you link it to the 3 names.  In zsh you have to do
some work.  I can't think of a real example which zsh makes easier than
ksh.

> 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.

I wanted to be sure you knew you were breaking ksh compatibility.  Since
you know and you still think it's right that's okay with me.  I don't
feel strongly about the issue because there are workarounds.  I used to
use these workarounds before zsh provided any ksh autoloading, I could
go back to using them if I found I needed to start using ksh again.

-- 
Roderick Schertler
roderick@argon.org


  reply	other threads:[~1997-03-27 19:02 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
1997-03-27 18:57     ` Roderick Schertler [this message]
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=14594.859489039@eeyore.ibcinc.com \
    --to=roderick@argon.org \
    --cc=zefram@dcs.warwick.ac.uk \
    --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).