zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@math.gatech.edu
Subject: Re: wrapper functions in modules
Date: Wed, 16 Dec 1998 01:50:48 -0800	[thread overview]
Message-ID: <981216015048.ZM11424@candle.brasslantern.com> (raw)
In-Reply-To: <199812160805.JAA00604@beta.informatik.hu-berlin.de>

On Dec 16,  9:05am, Sven Wischnowsky wrote:
} Subject: Re: wrapper functions in modules
}
} Bart Schaefer wrote:
} 
} > On Dec 15,  1:03pm, Sven Wischnowsky wrote:
} > }
} > } Bart Schaefer wrote:
} > } > Is the new first parameter of doshfunc() needed any longer?
} > } 
} > } [For those who don't want to look at the code: the argument is the
} > } name of the function to be executed.]
} > } 
} > } I added the argument since modules may be interested in it
} > 
} > Hm.  I'm not sure that modules *ought* to be interested in it, but...
} 
} I wouldn't resist to remove this or to use a global variable for it.

A parameter is almost always better than a global, for things that get
stacked and restored like this.

} > One thing a wrapper function might legitimately be interested in is the
} > context in which it was called.
} 
} Yes, that would be good to have. Using a global integer variable or an 
} argument and a couple of constants?

Here a global makes more sense, since it only changes once as you enter
(say) the completion code and remains constant all the way down the
shell function call chain.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1998-12-16  9:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  8:05 Sven Wischnowsky
1998-12-16  9:50 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-12-15 12:03 Sven Wischnowsky
1998-12-15 17:05 ` Bart Schaefer
1998-12-14 10:11 Sven Wischnowsky
1998-12-14 18:42 ` Bart Schaefer
1998-12-11 14:16 Sven Wischnowsky
1998-12-11 17:40 ` Bart Schaefer
1998-12-09 14:44 PATCH: " Sven Wischnowsky
1998-12-11 13:18 ` Bart Schaefer

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=981216015048.ZM11424@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --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).