[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requesting an alternate nameref feature

From: Chet Ramey
Subject: Re: Requesting an alternate nameref feature
Date: Sat, 15 Dec 2012 17:58:22 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

On 12/12/12 1:04 PM, Dan Douglas wrote:
> Hello. Could we possibly modify or create an additional variant of "typeset 
> -n"
> which produces "real" references rather than just dynamic references by name?
> In other words, I'd like to be able to create reference variables that always
> point to the instance of a variable that was visible at the time the reference
> was created, similar to the way ksh93's nameref works.

This is the `pointer' implementation, as opposed to the `symbolic link'
implementation I chose.

The problem is the same as any use of pointers: what happens when the
object you point to goes out of scope?  Or would you restrict it, like
declare -g, to only use the global scope?


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]