bug-bash
[Top][All Lists]
Advanced

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

Re: RFE: Fix the name collision issues and typing issues with namerefs,


From: tetsujin
Subject: Re: RFE: Fix the name collision issues and typing issues with namerefs, improve various issues for function libraries
Date: Wed, 14 Jun 2017 15:04:38 -0400


Yeah I didn't really consider ksh's "backward compatible" function
syntax in my post because using that form while looking for better
support for function libraries would be a needless handicap. You don't
even get local variables with the backward-compatible syntax, so
there's no hope of getting around issues like nameref collision.

Indeed, much of what I had to say about returning values from
functions was on your site. I included the information mainly to
provide some context to the feature request.

----- Original Message -----
From: "Greg Wooledge" <wooledg@eeg.ccf.org>
To:"bug-bash" <bug-bash@gnu.org>
Cc:
Sent:Wed, 14 Jun 2017 12:18:15 -0400
Subject:Re: RFE: Fix the name collision issues and typing issues with
namerefs, improve various issues for function libraries

 On Wed, Jun 14, 2017 at 12:04:35PM -0400, tetsujin@scope-eye.net
wrote:
 > So first off, the circular reference problem with "declare -n"
 > apparently doesn't exist in Korn Shell: If you "typeset -n x=$1",
and
 > $1 is "x", it's not a circular reference.

 Korn shell actually has two different *kinds* of functions.

...
 If you declare using: function foo { ...; }

 Then it works as you described.
...

 > Regarding return values, there's a couple ways of looking at this:
 > [...]

 You're retracing a lot of the ground I've already covered in the last
 few years. Which is cool, and I'll be happy if you find something
 that I missed.




reply via email to

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