zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Zefram <zefram@tao.co.uk>
Cc: zsh-workers@math.gatech.edu
Subject: Variable namespaces, goals for ZLE, etc.
Date: Tue, 9 Jun 1998 23:26:39 -0700	[thread overview]
Message-ID: <980609232639.ZM9523@candle.brasslantern.com> (raw)
In-Reply-To: <199806092002.VAA05396@taos.demon.co.uk>

On Jun 9,  9:02pm, Zefram wrote:
} Subject: Re: User-defined zle widgets and built-in widget failure
}
} Bart Schaefer wrote:
} >I think I'd rather not have to rewrite my .z* scripts again.  How much
} >"moving" are we talking about?
} 
} Actually, I don't anticipate permanently removing names established
} in 3.0.  An option, on by default in zsh mode, would enable the current
} names.  Those that take the time to rewrite their .z* scripts can then
} disable the current names, and get a parameter namespace as clean as
} possible.

What we need is a way to link variable names to one another, with a few
options for how the linkage is accomplished.  The options would include
having the names share a value, automatic array-to-colon-list conversion
(and back), etc.  It'd also be useful to be able to define the way that
import and export are performed (in which case the imported and exported
values might be separate).

} If we *don't* introduce a proper namespace scheme, I hate to think what
} will happen when modules gain the ability to define special parameters.

I don't expect it'd be any worse than the current situation with external
programs having to come up with names for their environment variables.
If you can explain why a namespace like "zsh." is better than a simple
convention like "ZSH_", I'm willing to be persuaded.  However, the only
reason for introducing naming hierarchy (even if only one level of it as
you've so far proposed) is to be able to manipulate entire hierarchies
as single entities.  If the name of the space is not useful except as a
differentiating prefix, then it's better simply to use a prefix.

} This is probably a good time to talk about what I've been doing for the
} past year.

Sounds like a pretty fun job.

} three basic aims:
} 
} 	(1) as little as possible should be built into the base zle module
} 
} 	(2) built-in widgets should use the same interfaces as
} 	    user-defined ones, so that they behave *as if* they were
} 	    shell functions
} 
} 	(3) as much of the ZLE state as possible should be directly
} 	    manipulable by user-defined widgets

I don't disagree with any of those.  However, don't go overboard with (1).
An example of a case where I think that idea was carried too far is with
the removal of so many of the default compctls in 3.1.4.  It seems quite
contradictory to me to turn on by default every flashy zle option, but to
turn off all the even-more-useful completion defaults. 

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


  reply	other threads:[~1998-06-10  6:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-09 17:09 User-defined zle widgets and built-in widget failure Bart Schaefer
1998-06-09 18:01 ` Zefram
1998-06-09 19:12   ` Bart Schaefer
1998-06-09 20:02     ` Zefram
1998-06-10  6:26       ` Bart Schaefer [this message]
1998-06-10 10:55         ` Variable namespaces, goals for ZLE, etc Zefram
1998-06-10 17:37           ` Bart Schaefer
1998-06-10 18:01             ` Zefram
1998-06-10 18:36               ` Bart Schaefer
1998-06-10 10:24       ` Associative arrays, structured namespaces Bruce Stephens
1998-06-10 10:44         ` Zefram
1998-06-10 12:07           ` Bruce Stephens
1998-06-10 12:28             ` Bruce Stephens

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=980609232639.ZM9523@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zefram@tao.co.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).