zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: Re: sorting/uniq-ing an array?
Date: Mon, 10 Aug 1998 11:13:40 -0700	[thread overview]
Message-ID: <980810111340.ZM27558@candle.brasslantern.com> (raw)
In-Reply-To: <35CF1EDF.4728CD91@sni.de>
In-Reply-To: <199808101632.RAA32056@diamond.tao.co.uk>

On Aug 10,  5:32pm, Zefram wrote:
} Subject: Re: sorting/uniq-ing an array?
}
} Bart Schaefer wrote:
} >Is there any difference (internally) between a plain array variable and
} >a colon-array, other than the set/get functions?
} 
} Yes.  Colon-separated `arrays' are actually scalars.

Ah, yes, of course.  What I'm asking is, other than changing the cfn.gets
and cfn.sets members of the param struct to point at colonarrgetfn and
colonarrsetfn, is there any other magic involved in managing colon-arrays?

On Aug 10,  8:25pm, Andrej Borsenkow wrote:
} Subject: Re: sorting/uniq-ing an array?
}
} But the main problem is user interface. Standard variables are lower
} case for arrays/upper case for scalars.

Standard linked pairs of arrays and colon-arrays behave that way, yes.
I'm not (yet) suggesting adding that sort of linkage.  I'm interested
only in being able to declare a colon-array variable.  For example, I
can't think of any reason to create ld_library_path as an array.

}   typeset -C <lower case name> => implicitly creates upper case scalar
} version

I think this is the wrong approach.  I think creating the colon-array
scalar and linking it to an array should be two separate steps (or at
least two separate typeset flags).  I don't think zsh should be in the
business of enforcing upper/lower case; in fact, I don't even think it
should even be a requirement that the two variables have similar names!

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


  reply	other threads:[~1998-08-10 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19980809025636.18149@astaroth.nit.gwu.edu>
     [not found] ` <980809044123.ZM19065@candle.brasslantern.com>
     [not found]   ` <19980809123608.01170@astaroth.nit.gwu.edu>
     [not found]     ` <vbvho1xe7s.fsf@snake.isode.com>
1998-08-10 15:55       ` Bart Schaefer
1998-08-10 16:25         ` Andrej Borsenkow
1998-08-10 16:32         ` Zefram
1998-08-10 18:13           ` Bart Schaefer [this message]
1998-08-11  9:31             ` Bruce Stephens
1998-08-11 17:59               ` 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=980810111340.ZM27558@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).