From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8659 invoked by alias); 17 Oct 2013 00:27:43 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31833 Received: (qmail 28039 invoked from network); 17 Oct 2013 00:27:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=+05pAjBNZJH86h1JxCnx8XTfB6KCmEZ6Hmjc8o4HSo4=; b=jZvfjd/nj+LiGdufy5HNnjRgy8HUz4qXXHCLqOwsb8k5JIVNYRVI4VPF+7FL57q7oX nZAB+2GRshV5wYMHP+LRdWX9KJNgEE9owMT2EIPzzEy3YGnjC2KOQNNkwD9IcyzDgV9x 4uPdbhB60YiFa7E9SIBCTBULv9FZIgqA3mkar9d2y/vXpIaPHKGOhAX10F0mwntsEHwE tI8k5e6JpAPPU/nuE+G8zQP3orbeH4oC/qETJttonezkHsD5QzG5QlKHq+G0YLZzlw9B YAuiEPwcSyxTTDmf8MRb+VFtffKxOFgCfy/1OQjox/C5kqF3Yi92wQ+ZoVu8AtjRQ1gP 7wYw== X-Gm-Message-State: ALoCoQmpWc+45NpAB2M1j6Ir9/NPA4Vajz5c7rRbYXIqlr4ZiCzYYTyz694Bn8y6/fggCOCEUXpj MIME-Version: 1.0 X-Received: by 10.152.36.41 with SMTP id n9mr4683579laj.21.1381969654891; Wed, 16 Oct 2013 17:27:34 -0700 (PDT) Date: Wed, 16 Oct 2013 17:27:34 -0700 Message-ID: Subject: Important discussion about "local" on the POSIX list From: Bart Schaefer To: Zsh hackers list Content-Type: text/plain; charset=ISO-8859-1 austin-group is discussing a proposal to make local variables lexical/static in scope, rather than dynamic in scope as in bash and zsh. I don't seem to be able to post to that list, so if there's someone here who still can, please have a gander and chime it. The discussion ranges over (1) whether "function name { ... }" vs. "name() { ... }" syntax determines whether a variable defined within the function has static scope (ksh93) and the keyword used to declare it is irrelevant; (2) whether "typeset" or "local" or something else would be used to declare such variables; (3) whether "local" would be allowed to have dynamic scope at all. It would be rather difficult in zsh's implementation to enforce lexical scoping, so we'd be faced with either giving up POSIX compliance or doing a massive rewrite.