[Top][All Lists]

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

Re: [Help-bash] Closure concept in bash

From: Chet Ramey
Subject: Re: [Help-bash] Closure concept in bash
Date: Tue, 31 Jan 2012 22:46:56 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 1/31/12 5:59 PM, Dan Douglas wrote:

> So they don't even have a way to get the kind of "cascading inheritence-like" 
> scope you get from bash? I find function wrappers with callees that see 
> locals 
> of a caller and then convieniently destroy themselves when returning to 
> really 
> clean up the solutions to some otherwise hard problems, which wouldn't be 
> worth the trade-offs in another langauge.

David Korn is adamant that ksh's sort-of-static scoping is better, to the
extent that he has threatened to not accept any Posix specification of
`local' that doesn't specify that scoping.  There's no way using Posix
functions, and no way using ksh functions except by sprinkling `export'
all over the place, to get the behavior you want.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden

reply via email to

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