From: "Mauricio Fernández" Date: 2003-02-13T08:21:35+09:00 Subject: Re: Lexical scope and closures On Thu, Feb 13, 2003 at 08:11:53AM +0900, Brian Candler wrote: > (3) some other syntax will be introduced for cases where you really need j > to be a block-local variable (e.g. if this block calls itself recursively or > is a thread). This might be something like: > > [1,2,3].each{|x| > local { |j| > j = x > } > } > > This has been discussed at great length :-) I know, but let me catch my chance to state that I want sugar for the above! (never thought I'd ask for that at the time I admired C's terse syntax, but I'm requesting terseness, anyway: the above involves lots of typing and another indentation level) -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Footnotes are for things you believe don't really belong in LDP manuals, but want to include anyway. -- Joel N. Weber II discussing the 'make' chapter of LPG