[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: hook after in/do/end
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 12 Jan 2010 19:20:19 +0200
On Tue, Jan 12, 2010 at 7:04 PM, Tony Finch <firstname.lastname@example.org> wrote:
> It occurred to me that a nice way to express the hook after a lexical
> block might be as follows, somewhat inspired by for loop iterators.
> in env, hook do
This would be easier than yet-another-metamethod-on-env, I must say.
Although, the hook parameter would be optional, so 'in env do...end'
remains (and people need never know that there are block hooks)
Although checking block exit could slow down this construct, which is
often going to be used as a convenient multiple-field assignment with